lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <>
Subject Re: Filter query method
Date Wed, 08 Nov 2006 18:40:48 GMT
spinergywmy <> wrote on 08/11/2006 01:56:00:
>       within my first search result, there is only one record that
> "Java" and "Tomcat" words, therefore, there should be only one record
> for 2nd search. And the highlight is now move from "Java" to "Tomcat".

To my understanding the 2nd suggestion does exactly this, as long as the
highlighter QueryScorer is based on q2:

  :  (2) score only by str2, filter by str1:
  :      Query query1 = parser.parse(searchString1);
  :      Filter f1 = new QueryFilter(query1);
  :      Query q2 = parser.parse(searchString2);
  :      Hits searchHits =,f1);

>       basically, my second search query should be searching within the
> result records rather than go back to the index folder to redo the search
> contents again.

Going back to the server (for q1) might take more time, but is simple. Task
wise, does not block you from programming any behavior required (e.g. the
various options that Chris mentioned). You would be able to get the same
results - returned docs, their scores, highlighting - as when not going
back to the server (for q1). Only disadvantage might be performance. Did
you get that working but saw performance problems?

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

View raw message