sunny6142 commented on issue #15442:
URL: https://github.com/apache/lucene/issues/15442#issuecomment-3557885217
## Reproduction
### Scenario 1: Phrase Expansion Loses Boost
```java
// Create overlapping boosted phrases
Query q1 = new BoostQuery(new PhraseQuery("contract", "termination"), 10.0f);
Query q2 = new BoostQuery(new PhraseQuery("termination", "clause"), 5.0f);
BooleanQuery query = new BooleanQuery.Builder()
.add(q1, SHOULD).add(q2, SHOULD).build();
// FastVectorHighlighter processes this
FieldQuery fieldQuery = new FieldQuery(query, reader, true, true);
// Result: Expanded "contract termination clause" gets boost 1.0 instead of
meaningful value
```
### Scenario 2: Nested Boost
```java
// Create nested boost query
PhraseQuery baseQuery = new PhraseQuery("important", "document");
Query innerBoost = new BoostQuery(baseQuery, 3.0f);
Query outerBoost = new BoostQuery(innerBoost, 2.0f);
// FastVectorHighlighter processes this
FieldQuery fieldQuery = new FieldQuery(outerBoost, reader, true, true);
// Result: Gets boost 2.0, should it get better boost
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]