lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: [jira] Created: (SOLR-44) Basic Facet Count support
Date Sun, 03 Sep 2006 23:33:02 GMT

: : One thing that my facet code does is compute the count for all items
: : that have _no_ terms in a particular field, and makes an
: : <unspecified> count as well.  It does this by putting all documents
: : found into a DocSet as it iterates through all terms for a field, and
: : then .andNot'ing it away from an all docs query.  Not pretty, but
: : does work and works quite fast.

when i went to add this, it occured to me that it was probably just easier
toget the DocSet for "field:[* TO *]" and andNot that with the main set of
matches -- it means conputing one additional (large) DocSet for each field
- but for fields with a lot of terms it should be a lot faster then doing
one andNot per term. ... and i'm 99.9999% sure it's functionaly
equivilent (right?)

(this only works for "facet fields" like this of course ... if/when we
have arbitrarily complex "facets" defined by a set of rules implemented as
queries we'd certainly need the DocSet.andNot approach)


View raw message