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

Michael McCandless commented on LUCENE-6308:
--------------------------------------------

bq. I've seen people use large posInc gaps between fields. This can make huge 
position numbers. Also if someone forgets clearAttributes the positions grow 
exponentially. Sure its bad, but for small docs i bet plenty of people have 
HUGE positions and don't realize it.

I think such examples are really abuse cases?  We shouldn't design
for abuse cases...

Also such users (jumping by enormous position increments each time)
are unlikely to precisely hit Integer.MAX_VALUE ... they are more
likely to overflow it.

What I find compelling about Integer.MAX_VALUE is it makes priority
queues that are merge-sorting N position iterators work "naturally",
so they can simply compare by position, and only once all iterators
are "on" a position must they check whether that position is
Integer.MAX_VALUE.  But if we use -2, then every time we .nextPosition
each iterator we must check if it's ended.

I do agree we should fix IW to detect this during indexing, and
CheckIndex to detect it.

I also like the consistency with NO_MORE_DOCS.


> SpansEnum, deprecate Spans
> --------------------------
>
>                 Key: LUCENE-6308
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6308
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: Trunk
>            Reporter: Paul Elschot
>            Priority: Minor
>         Attachments: LUCENE-6308-changeapi.patch, 
> LUCENE-6308-changeapi.patch, LUCENE-6308-changeapi.patch, 
> LUCENE-6308-changeapi.patch, LUCENE-6308-changeapi.patch, LUCENE-6308.patch, 
> LUCENE-6308.patch, LUCENE-6308.patch, LUCENE-6308.patch, LUCENE-6308.patch, 
> LUCENE-6308.patch
>
>
> An alternative for Spans that looks more like PositionsEnum and adds two 
> phase doc id iteration



--
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