I am assuming you meant should not be returned right?  I basically
return a filtered doc id set and do the following


return new FilteredDocIdSet(startingFilter.getDocIdSet(readerCtx, acceptDocs)) {
                        @Override
                        public boolean match(int doc) {

                                //do custom stuff
                        }
                };


does the filtereddocidset give me only the ones that match, or is
there something additional I need to do in addition to my custom match
logic here?  I.e. just do if(!acceptDocs.get(doc)) return false; at
the top?

On Sat, Feb 25, 2012 at 3:23 PM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> On Sat, Feb 25, 2012 at 3:16 PM, Jamie Johnson <jej2...@gmail.com> wrote:
>> I'm trying to upgrade an application I have from an old snapshot of
>> solr to the latest stable trunk and see that the constructor for
>> Filter has changed, specifically there is another parameter named
>> acceptDocs, the API says the following
>>
>> acceptDocs - Bits that represent the allowable docs to match
>> (typically deleted docs but possibly filtering other documents)
>>
>> but I'm not sure what specifically this means to my filter.  How
>> should this be used when trying to upgrade a filter?
>
> If a document doesn't match acceptDocs, it should be returned by the filter.
> Lucene is basically asking "what documents match your filter AND match
> acceptDocs"
>
> -Yonik
> lucenerevolution.com - Lucene/Solr Open Source Search Conference.
> Boston May 7-10

Reply via email to