lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Indexing flat files with out .txt extension
Date Thu, 06 Jan 2005 00:21:18 GMT

On Jan 5, 2005, at 6:31 PM, Hetan Shah wrote:
> How can one index simple text files with out the .txt extension. I am 
> trying to use the IndexFiles and IndexHTML but not to my satisfaction. 
> In the IndexFiles I do not get any control over the content of the 
> file and in case of IndexHTML the files with out any extension do not 
> get index all together. Any pointers are really appreciated.

Try out the Indexer code from Lucene in Action.  You can download it 
from the link here: 
http://www.lucenebook.com/blog/announcements/sourcecode.html

It'll be cleaner to follow and borrow from.  The code that ships with 
Lucene is for demonstration purposes.  It surprises me how often folks 
use that code to build real indexes.  It's quite straightforward to 
create your own Java code to do the indexing in whatever manner you 
like, borrowing from examples.

When you get the download unpacked, simply run "ant Indexer" to see it 
in action.  And then "ant Searcher" to search the index just built.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message