On Jan 11, 2005, at 7:28 PM, Hetan Shah wrote:
Thanks for the pointers, I have modified the Indexer.java to index the
files from the directory by removing the file extenstion check of
(".txt"). Now I do get the index from the files.

...


java org.apache.lucene.demo.SearchFiles

The problem is you're using the SearchFiles demo code, which uses different field names than Indexer.java. You need to be sure the searching and indexing code agree on the field names. Since you borrowed from Indexer.java from LIA, keep borrowing from Searcher.java. You can run "ant Searcher" from the LIA source code.


Be sure to really learn what's going on in that code rather than just accepting what its doing - this will pay off as you continue to evolve your application. Indexer.java has only 6 (effective) lines of code tied to Lucene's API, and similarly very few lines of Lucene-dependent code in Searcher.java. All of this is demo code, and is designed to be adapted to your needs.

        Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to