lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Hits issue or custom filter issue?
Date Wed, 14 Sep 2005 00:45:19 GMT

I just had another thought:  is the number of results you get back from
each of the filters the same as the number you get back if you apply no
filter?

If so, then:

a) Perhaps you don't realize this, but a Filter can never be used to
increase the number of results returned by a query.  Filter's can only
limit the number of items returned.  No matter how many bits are set to
true in the BitSet you return, the Searcher won't even check the bits for
documents with a score of zero.

b) Is it possible that your filter isn't doing anything all, ie: is there
any execution path that may return a BitSet in which every bit is set?


...also, an easy way to sanity test your CustomFilter is to skip the Query
object alltogether, and just call the Filter.bits(IndexReader) directly
on each filter, and compare the BitSets you get back.  if they are
.equals() then there's your problem.




: Date: Tue, 13 Sep 2005 17:22:49 -0700
: From: Jeff Rodenburg <jeff.rodenburg@gmail.com>
: Reply-To: java-user@lucene.apache.org, jeff.rodenburg@gmail.com
: To: Chris Hostetter <hossman_lucene@fucit.org>
: Cc: java-user@lucene.apache.org
: Subject: Re: Hits issue or custom filter issue?
:
: Might be the same issue, haven't been able to determine during a
: step-through on the code exec.
: You're right, no need to add a new FilteredQuery to the statement, just a
: search on combinedQuery with a new myCustomFilter.
: Unfortunately, no joy; same response.
:
: -- j
:
: On 9/13/05, Chris Hostetter <hossman_lucene@fucit.org> wrote:
: >
: >
: > : Hits h1 = oMultiSearcher.Search(new FilteredQuery(combinedQuery, new
: > : myCustomFilter(1)));
: > : Hits h2 = oMultiSearcher.Search(new FilteredQuery(combinedQuery, new
: > : myCustomFilter(2)));
: >
: > ...do you get the same results if you use...
: >
: > Hits h1 = oMultiSearcher.search(combinedQuery, myCustomFilter(1));
: > Hits h2 = oMultiSearcher.search(combinedQuery, myCustomFilter(2));
: >
: > ...I'm not sure why you wouldn't use that method call instead anyway.
: >
: > This may be another sympton of a bug that worked in the trunk when i
: > reported it...
: >
: > http://issues.apache.org/jira/secure/ViewIssue.jspa?key=LUCENE-366
: >
: >
: >
: > -Hoss
: >
: >
:



-Hoss


---------------------------------------------------------------------
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