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

Christine Poerschke commented on LUCENE-8637:
---------------------------------------------

bq. Method mustRewriteQuery(SpanQuery) returns true for ... and SpanBoostQuery, 
however, these queries do not require rewriting. ...

In LUCENE-10477 we found that a {{SpanBoostQuery}} requires rewriting if it 
wraps a {{SpanMultiTermQueryWrapper}} query (but if the boost factor is 
{{1.0f}} the rewriting doesn't happen due to a bug in 
{{SpanBoostQuery.rewrite}} i.e. the rewrite is a no-op when it shouldn't be).

> WeightedSpanTermExtractor unnexessarily enforces rewrite for some SpanQueiries
> ------------------------------------------------------------------------------
>
>                 Key: LUCENE-8637
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8637
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/highlighter
>    Affects Versions: 7.4, 7.3.1, 7.5, 7.6
>            Reporter: Christoph Goller
>            Priority: Minor
>              Labels: patch
>         Attachments: WeightedSpanTermExtractor.java
>
>
> Method mustRewriteQuery(SpanQuery) returns true for SpanPositionCheckQuery, 
> SpanContainingQuery, SpanWithinQuery, and SpanBoostQuery, however, these 
> queries do not require rewriting. One effect of this is e.g. that 
> UnifiedHighlighter does not work with OffsetSource Postings and switches to 
> Analysis which of course has consequences for performance.
> I attach a patch for lucene version 7.6.0. I have not checked whether it 
> breaks existing unit tests.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to