[
https://issues.apache.org/jira/browse/LUCENE-2760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Muir updated LUCENE-2760:
--------------------------------
Attachment: LUCENE-2760.patch
here's an updated patch, with javadocs.
additionally i now check for spans.start() *>=* end() instead of spans.start()
*>* end()
i believe its invalid to have a zero-length span (e.g. for a single term end =
start+1)
I added an assert to check for this, and all tests still pass.
> optimize spanfirstquery, spanpositionrangequery
> -----------------------------------------------
>
> Key: LUCENE-2760
> URL: https://issues.apache.org/jira/browse/LUCENE-2760
> Project: Lucene - Java
> Issue Type: Improvement
> Reporter: Robert Muir
> Fix For: 3.1, 4.0
>
> Attachments: LUCENE-2760.patch, LUCENE-2760.patch
>
>
> SpanFirstQuery and SpanPositionRangeQuery (SpanFirst is just a special case
> of this), are currently inefficient.
> Take this worst case example: SpanFirstQuery("the").
> Currently the code reads all the positions for the term "the".
> But when enumerating spans, once we have passed the allowable range we should
> move on to the next document (skipTo)
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]