lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M. Smit" <>
Subject retrieve tokens
Date Wed, 22 Dec 2004 15:05:33 GMT
Hello list,

I'm not sure if this subject will cover my question, but here goes:

consider the following snippet:

is = new IndexSearcher((String) envContext.lookup("search_index_dir"));
StopAnalyzer analyzer = new 

parser = new 
NewMultiFieldQueryParser(ArticleIndexer.FIELDS_SEARCH_BASIC, analyzer);
query = parser.parse(searchForm.getCriteria());

hits =;"[execute] aantal Lucene hits: " + hits.length());

Perfect.. And when I present the results, I retrieve the original 
document from the database through it guid which I get from the 
doc.get(ArticleIndexer.FIELD_GUID). And besides some businesslogic I 
have to take care of when I retrieve the original document, I would also 
like to give a context snippet.

So I've written a class which takes care of this context 'snippeting and 
highlighting' (perhaps somebody knows about a great project which I 
haven't found last week while hunting for it). But I need to have the 
original query.. And preferable the words assiociated with the fields in 
(String[]) ArticleIndexer.FIELDS_SEARCH_BASIC. Because every field 
correspond with a different text-blob in  my DB, so I have to know which 
BufferedReader I have to parse for the associated words..

Thank you for your time,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message