lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] Commented: (LUCENE-2929) all postings enums must explicitly declare what they need up-front.
Date Sat, 19 Feb 2011 14:13:38 GMT


Robert Muir commented on LUCENE-2929:

And: if you ask for docs and freqs but the field omitTFAP, we should return
an error in some fashion similar to what the bulk API does.

I think we do this now if you ask for a DocsAndPositionsEnum when the field omitTFAP,
but we continue to lie and return TF=1 freqs in this case, which is not true,
there is simply no freq data at all.

> all postings enums must explicitly declare what they need up-front.
> -------------------------------------------------------------------
>                 Key: LUCENE-2929
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Task
>            Reporter: Robert Muir
>             Fix For: 4.0
> Currently, the DocsEnum api assumes you *might* consumes freqs at any time.
> Additionally the DocsAndPositionsEnum api assumes you *might* consume a payload at any
> High level things such as queries know what kinds of data they need from the index up-front,
> and the current APIs are limiting to codecs (other than Standard, which has these intertwined).
> So, we either need DocsAndFreqsEnum, DocsPositionsAndPayloadsEnum, or at least booleans
> in the methods that create these to specify whether you want freqs or payloads.
> we did this for freqs in the bulkpostings API, which is good, but these DocsEnum apis
> are also new in 4.0 and there's no reason to introduce non-performant APIs.
> additionally when/if we add payloads to the bulkpostings API, we should make sure we
> the same trend and require you to specify you want payloads or not up-front.

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message