Exercise 1: Add new content

Add new content

Introduction:

Updating applications as additional material becomes available is a common requirement. The purpose of this exercise is to familiarize you with the workflow for adding new content and metadata to an existing XTF instance and the use of the textIndexer utility.

Demonstration:

Steps:

  1. Go to eScholarship and do a search on your favorite topic:

  2. Select a document and download the PDF to an appropriately named directory in %XTF_HOME%\data\pdf, e.g.:

    %XTF_HOME%\data\pdf\newDoc\newDoc.pdf

    The directory name and the document name (minus its extension) must match.

  3. Add a copy of the provided Dublin Core (1) metadata template to your new directory:

    a) go to the handouts directory (%XTFWS%\handouts) and copy template.dc.xml

    b) paste the copy into your new directory (%XTF_HOME%\data\pdf\newDoc) and replace the word “template” with the name of your file (minus the extension) Example: newDoc.dc.xml
    The metadata name (minus “.dc.xml”) must match the directory and document names,
    i.e., all three names must be the same.

  4. Using your XML editor:

    a) open: %XTF_HOME%\data\pdf\newDoc\newDoc.dc.xml

    b) use the document splash page from eScholarship and/or the document itself to fill in the fields

    For Example:

    metadata record

    c) save the file

  5. Shut down tomcat.

  6. Do an incremental re-index (2) to include the new document.

  7. Start up tomcat.

  8. Check to make sure your new document is appearing in the results by visiting this URL:

    http://localhost:8080/xtf/search?type=pdf

    Selecting “type=pdf” in the URL above gives you the complete set of the PDF documents.

    You should see an entry for the pdf you added:

Next tutorial step: Exercise 2: Change a piece of metadata