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 StopAnalyzer(ArticleIndexer.SEARCH_STOP_WORDS_NL);
parser = new NewMultiFieldQueryParser(ArticleIndexer.FIELDS_SEARCH_BASIC, analyzer);
parser.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
query = parser.parse(searchForm.getCriteria());
hits = is.search(query); log.info("[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, Martijn
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]