The Essentials

Indexing the sample documents

Now let’s try to index the sample document library.

  1. Open a command prompt: double-click cmdPrompt.bat (Windows) or cmdPrompt.command (Mac).
  2. Execute the textIndexer by entering the following where shown below: textIndexer -index default

Executing the textindexer

The output should look something like this:

Searching the documents

Once the document library has been indexed, you can verify that basic document searching using crossQuery servlet works.

First, we need to start up Tomcat. Double-click runTomcat.bat (Windows) or runTomcat.command (Mac)

Once Tomcat has started, open a web browser and go to this address: http://localhost:8080/xtf/search Doing so should bring up a page where you can enter information to search for, like this:

Entering the word africa in the keyword field and pressing the Search button should yield a list of matching documents.

Clicking on a book title takes you to the cover page, demonstrating the dynaXML servlet. Back on the search results, clicking on the word Africa in the one of the snippets will take you to the actual place in the book where the word “Africa” appears.

Congratulations! You’re done installing XTF.

Next tutorial step: “Crib sheet” for the exercises