lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Union and intersection methods in solr DocSet
Date Thu, 07 May 2015 00:36:25 GMT

: DocSet docset1 = Searcher.getDocSet(query1)
: DocSet docset2 = Searcher.getDocSet(query2);
: 
: Docset finalDocset = docset1.intersection(docset2);
: 
: Is this a valid approach ? Give docset could either be a sortedintdocset or
: a bitdocset. I am facing ArrayIndexOutOfBoundException when
: union/intersected between different kind of docsets.

as far as i know, that should be a totally valid usage -- since you didn't 
provide the details of the stack trace or the code you wrote that 
produced it it's hard to guess why/where it's causing the exception.

FWIW: SolrIndexSearcher has getDocSet methods that take multiple arguments 
which might be more efficient then doing the intersection directly (and 
are cache aware)

if all you care about is the *size* of the intersection, see the 
SolrIndexSearcher.numDocs methods.

-Hoss
http://www.lucidworks.com/

Mime
View raw message