lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12667] New: - MultiSearcher does not work with MultiTermQuery or PrefixQuery
Date Sun, 15 Sep 2002 22:23:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12667>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12667

MultiSearcher does not work with MultiTermQuery or PrefixQuery

           Summary: MultiSearcher does not work with MultiTermQuery or
                    PrefixQuery
           Product: Lucene
           Version: 1.2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Search
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: alt@picnic.demon.co.uk


The multiSearch class reuses Query objects. Unfortunately some Query sub-classes
initialize the search with terms from the index that they are first used on.
This means that subsequent uses on other indexes can result in missing hits.

For example subclasses of MultiTermQuery pre "populate" their terms from the
first index. If this query is used again then the terms are not reset so the
query is in effect done over terms extracted from the 1st index and not the 2nd. 

So the query

a*b

when expanded using terms from the first index as

a1b a2b a3b

and it is this query that is performed multiple times.

If a second index has the terms

a1b a2b a3b a4b a5b

then potential results are missing. The latter two terms are not considered in
the search.

This can easily be seen by "reversing" the order of Searcher objects in a
MultiSearcher query. Different results can be displayed depending on the ordering.

The solution would be to allow queries to be "reset" - thus removing the cache
terms objects.

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message