lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: [DISCUSS] Merge DocsEnum and DocsAndPositionsEnum into PostingsEnum
Date Thu, 01 Nov 2012 20:29:11 GMT
On Thu, Nov 1, 2012 at 4:26 PM, Simon Willnauer
<simon.willnauer@gmail.com> wrote:
> hey folks,
>
> I have spend a hell lot of time on the positions branch to make
> positions and offsets working on all queries if needed. The one thing
> that bugged me the most is the distinction between DocsEnum and
> DocsAndPositionsEnum. Really when you look at it closer DocsEnum is a
> DocsAndFreqsEnum and if we omit Freqs we should return a DocIdSetIter.
> Same is true for
> DocsAndPostionsAndPayloadsAndOffsets*YourFancyFeatureHere*Enum. I
> don't really see the benefits from this. We should rather make the
> interface simple and call it something like PostingsEnum where you
> have to specify flags on the TermsIterator and if we can't provide the
> sufficient enum we throw an exception?
> I just want to bring up the idea here since it might simplify a lot
> for users as well for us when improving our positions / offset etc.
> support.
>

This is an interesting idea. If we forget about TermDocs/TermPositions
and were doing it from scratch, would we have two separate classes?
And whats the advantage? (you already get null if you ask for
positions and they arent there, and queries throw exception on that,
its unrelated to the enum classes themselves).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message