On 10/23/06, Mike Austin <[EMAIL PROTECTED]> wrote:
How can I get a count like I do by using searcher.numDocs(query, docset) but
with it doing an OR operation? I want the number of documents that match a
OR b?

It's not clear to me what you are trying to calculate.
In code, If you just want the size of the union of two sets, use
DocSet.unionSize().
If you want the number of documents in a query that match a or b, then use

numDocs(query, getDocSet("a OR b"))
 OR
numDocs(query, getDocSet("a").union(getDocSet("b")))

From the request handlers, the only thing you could do would be to
combine a OR b in a single facet query:

q=foo&facet.query=a OR b

It wouldn't result in optimal caching if a and b have many valid
combinations, but that could possibly be handled by a future
optimization in Solr that could decompose boolean queries int
getDocSet().

-Yonik

Reply via email to