[ 
https://issues.apache.org/jira/browse/LUCENE-6226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14314082#comment-14314082
 ] 

Alan Woodward commented on LUCENE-6226:
---------------------------------------

When requesting postings features that don't exist in the index, does it make 
sense to throw an exception of some kind from createWeight()?  There's no way 
the query can run, and you want to know about it as soon as possible.

For 'nonsensical' requests, we already have 'information unavailable' defaults 
on PostingsEnum: -1 for positions and offsets, null for payloads, so I think 
it's fine to just return that.

I'm not sure about dropping offsets from the enum though.  We don't have 
anything that uses them now, but one of the reasons for doing this is so that 
we can add a highlighter that iterates through the positions from a scorer, and 
that will need to use offsets.  And a totally-ordered enum that misses out 
offsets will preclude us from adding that back in.  Maybe I should just switch 
it back to the bitset again, but change FLAG_POSITIONS so that it doesn't 
require freqs (I had assumed that pulling positions automatically meant pulling 
freqs, but it sounds as though I've misunderstood that).

> Allow TermScorer to expose positions, offsets and payloads
> ----------------------------------------------------------
>
>                 Key: LUCENE-6226
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6226
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>             Fix For: Trunk, 5.1
>
>         Attachments: LUCENE-6226.patch, LUCENE-6226.patch, LUCENE-6226.patch, 
> LUCENE-6226.patch, LUCENE-6226.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to