You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Nilesh Kamani <ni...@gmail.com> on 2017/03/05 04:09:03 UTC

re-iterate over DocIdSetIterator ?

Hello Dev Team,

Is it possible to re-iterate over the DocIdSetIterator without causing any
issues ?


Thanks,
Nilesh Kamani

Re: re-iterate over DocIdSetIterator ?

Posted by Michael McCandless <lu...@mikemccandless.com>.
Ahh, in that case you should simply pull another Scorer insance again from
the Weight?

But ... maybe step back a bit and describe the overall use case here?

Mike McCandless

http://blog.mikemccandless.com

On Sun, Mar 5, 2017 at 6:51 PM, Nilesh Kamani <ni...@gmail.com>
wrote:

> Which method do you recommend to use ?
> .iterator() method in Scorer.class has below java comment which is not
> matching my requirement.
>
> Return a DocIdSetIterator over matching documents. The returned iterator
> will either be positioned on -1 if no documents have been scored yet,
> DocIdSetIterator.NO_MORE_DOCS if all documents have been scored already,
> or the last document id that has been scored otherwise. The returned
> iterator is a view: calling this method several times will return iterators
> that have the same state.
>
>
>
> On Sun, Mar 5, 2017 at 6:00 AM, Michael McCandless <
> lucene@mikemccandless.com> wrote:
>
>> You must pull another DISI instance from your original source (e.g. a
>> Scorer) and then iterate over that one.
>>
>> Once a given DISI instance is exhausted, it's done.
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>> On Sat, Mar 4, 2017 at 11:09 PM, Nilesh Kamani <ni...@gmail.com>
>> wrote:
>>
>>> Hello Dev Team,
>>>
>>> Is it possible to re-iterate over the DocIdSetIterator without causing
>>> any issues ?
>>>
>>>
>>> Thanks,
>>> Nilesh Kamani
>>>
>>
>>
>

Re: re-iterate over DocIdSetIterator ?

Posted by Nilesh Kamani <ni...@gmail.com>.
Which method do you recommend to use ?
.iterator() method in Scorer.class has below java comment which is not
matching my requirement.

Return a DocIdSetIterator over matching documents. The returned iterator
will either be positioned on -1 if no documents have been scored yet,
DocIdSetIterator.NO_MORE_DOCS if all documents have been scored already, or
the last document id that has been scored otherwise. The returned iterator
is a view: calling this method several times will return iterators that
have the same state.



On Sun, Mar 5, 2017 at 6:00 AM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> You must pull another DISI instance from your original source (e.g. a
> Scorer) and then iterate over that one.
>
> Once a given DISI instance is exhausted, it's done.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Sat, Mar 4, 2017 at 11:09 PM, Nilesh Kamani <ni...@gmail.com>
> wrote:
>
>> Hello Dev Team,
>>
>> Is it possible to re-iterate over the DocIdSetIterator without causing
>> any issues ?
>>
>>
>> Thanks,
>> Nilesh Kamani
>>
>
>

Re: re-iterate over DocIdSetIterator ?

Posted by Michael McCandless <lu...@mikemccandless.com>.
You must pull another DISI instance from your original source (e.g. a
Scorer) and then iterate over that one.

Once a given DISI instance is exhausted, it's done.

Mike McCandless

http://blog.mikemccandless.com

On Sat, Mar 4, 2017 at 11:09 PM, Nilesh Kamani <ni...@gmail.com>
wrote:

> Hello Dev Team,
>
> Is it possible to re-iterate over the DocIdSetIterator without causing any
> issues ?
>
>
> Thanks,
> Nilesh Kamani
>