lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Using Filters with SolrIndexSearcher
Date Mon, 06 Oct 2008 05:21:04 GMT

: I have a lucene CustomScoreQuery which I am wanting to execute with a lucene
: Filter.  However the getDocListAndSet API provided by the SolrIndexSearcher
: doesn't seem to allow Filters to be used along with Queries.  Instead it
: seems that the Filters must be first converted to a DocSet.  Internally, the
: SolrIndexSearcher then seems to call, HitCollector),
: which results in my CustomScoreQuery being called for every document
: resulting from the query (which in my case is every document in the index),
: instead of those resulting from the Query and the Filter.  Ideally
: SolrIndexSearcher would call something like, Filter,

this statement confuses me ... independent of anything in SOlr, if you are 
using Lucene directly then a CustomScoreQuery that matches every doc in 
your index should wind up iterating over every document regardless of 
wether a filter is applied.  this hsouldn't work any differently in Solr 
when dealing with DocSets instead of Filters.

If you only care about docs that match a certian filter, couldn't you use 
that Filter to create subQuery for your ConstantScoreQuery?  (instead of a 
MatchAllDocs query which is what it sounds like you're using right now)

If i'm missunderstanding your question, posting some code so we can see 
what you are trying would be helpful.


View raw message