lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: Filter query method
Date Wed, 08 Nov 2006 18:40:48 GMT
spinergywmy <spinergywmy@gmail.com> wrote on 08/11/2006 01:56:00:
>       within my first search result, there is only one record that
contains
> "Java" and "Tomcat" words, therefore, there should be only one record
return
> 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 = searcher.search(q2,f1);


>       basically, my second search query should be searching within the
first
> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message