You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (Updated) (JIRA)" <ji...@apache.org> on 2011/11/18 18:12:51 UTC

[jira] [Updated] (LUCENE-2929) all postings enums must explicitly declare what they need up-front.

     [ https://issues.apache.org/jira/browse/LUCENE-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-2929:
---------------------------------------

    Attachment: LUCENE-2929.patch

Patch, splitting out DocsAndFreqsEnum from DocsEnum, and fixing all
places to pull the actual enum they need.

I also added helper methods in _TestUtil to pull Docs/AndFreqsEnum,
randomly sometimes "upgrading" the enum pulled (eg, if you wanted
DocsEnum you might get a DocsAndFreqsEnum instead).

The codec is allowed to return null from TermsEnum.docsAndFreqs, which
means term freqs were not indexed for that field (ie IndexOptions.DOCS_ONLY).

Just like the bulk branch, I broke out a MatchOnlyTermScorer, and also
MatchOnlyConjunctionTermScorer.

Still have to make "and payloads" strongly typed as well...

                
> all postings enums must explicitly declare what they need up-front.
> -------------------------------------------------------------------
>
>                 Key: LUCENE-2929
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2929
>             Project: Lucene - Java
>          Issue Type: Task
>            Reporter: Robert Muir
>             Fix For: 4.0
>
>         Attachments: LUCENE-2929.patch
>
>
> Currently, the DocsEnum api assumes you *might* consumes freqs at any time.
> Additionally the DocsAndPositionsEnum api assumes you *might* consume a payload at any time.
> 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 keep
> the same trend and require you to specify you want payloads or not up-front.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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