lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (LUCENE-6271) PostingsEnum should have consistent flags behavior
Date Wed, 01 Apr 2015 00:29:55 GMT


ASF subversion and git services commented on LUCENE-6271:

Commit 1670525 from [~rcmuir] in branch 'dev/branches/lucene6271'
[ ]

LUCENE-6271: fix another test bug (happens in nightly more often) unrelated to this branch

> PostingsEnum should have consistent flags behavior
> --------------------------------------------------
>                 Key: LUCENE-6271
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Ryan Ernst
>         Attachments: LUCENE-6271.patch
> When asking for flags like OFFSETS or PAYLOADS with DocsAndPositionsEnum, the behavior
was to always return an enum, even if offsets or payloads were not indexed.  They would just
not be available from the enum if they were not present.  This behavior was carried over to
PostingsEnum, which is good.
> However, the new POSITIONS flag has different behavior.  If positions are not available,
null is returned, instead of a PostingsEnum that just gives access to freqs.  This behavior
is confusing, as it means you have to special case asking for positions (only ask if you know
they were indexed) which sort of defeats the purpose of the unified PostingsEnum.
> We should make POSITIONS have the same behavior as other flags. The trickiest part will
be maintaining backcompat for DocsAndPositionsEnum in 5.x, but I think it can be done.

This message was sent by Atlassian JIRA

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

View raw message