[
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alan Woodward updated LUCENE-6466:
----------------------------------
Attachment: LUCENE-6466.patch
Here is a patch. SpanQuery.createWeight() is now final, and delegates on to an
abstract method #createSpanWeight(). This takes an additional boolean
parameter to determine whether or not the weight is at the top of a span tree,
in which case it should build term stats.
Ideally I'd have liked to move SpanQuery.extractTerms() to SpanWeight as well,
but that causes complications when collecting terms in the SpanWeight
constructor (basically you can't call extractTerms on a delegate from a super
constructor, because the delegate hasn't been set yet).
> Move SpanQuery.getSpans() to SpanWeight
> ---------------------------------------
>
> Key: LUCENE-6466
> URL: https://issues.apache.org/jira/browse/LUCENE-6466
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Alan Woodward
> Priority: Minor
> Attachments: LUCENE-6466.patch
>
>
> SpanQuery.getSpans() should only be called on rewritten queries, so it seems
> to make more sense to have this being called from SpanWeight
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]