[Xapian-tickets] [Xapian] #387: Optimisation for a filter term matching all documents
Xapian
nobody at xapian.org
Fri Jul 3 15:24:08 BST 2009
#387: Optimisation for a filter term matching all documents
-------------------------+--------------------------------------------------
Reporter: olly | Owner: olly
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Matcher | Version:
Severity: normal | Blockedby:
Platform: All | Blocking:
-------------------------+--------------------------------------------------
If a term matches all documents (i.e. termfreq == doccount) and we don't
want weight information for it (e.g. we're using {{{OP_FILTER}}} or
{{{BoolWeight}}}) then we don't actually need to look at its postings at
all - we can just treat it as {{{QueryMatchAll}}}.
This might not seem very useful, but if it worked at the submatch level,
it would allow database selection from within the query string using
"database:1" to filter by XDB1, or something like that.
This would also naturally extend to optimising a term which matches
exactly a contiguous range of documents if we start storing the highest
and lowest document id a term indexes, which we plan to do at some point,
since if (termfreq = highest_docid - lowest_docid + 1) then we know
exactly the documents the term indexes without looking at the postings.
--
Ticket URL: <http://trac.xapian.org/ticket/387>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list