You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "yangfeng123456 (via GitHub)" <gi...@apache.org> on 2026/01/23 10:18:17 UTC

[PR] Fix/fvh boost issue [lucene]

yangfeng123456 opened a new pull request, #15604:
URL: https://github.com/apache/lucene/pull/15604

   Summary
   This PR fixes a small issue in FastVectorHighlighter where boost values were not fully preserved when overlapping phrases were merged (#15442).
   The change is limited to the boost accumulation logic, and a unit test is added to cover the case.
   
   Motivation
   While investigating FastVectorHighlighter behavior with overlapping phrase queries, I noticed that part of the boost information could be lost during phrase merging.
   This can lead to highlight scoring that does not fully reflect the original query boosts.
   This mainly affects legacy Elasticsearch and Solr setups that still rely on FVH.
   
   Implementation
   Preserve boost values when merging overlapping WeightedPhraseInfo instances
   Add a small null-safety guard around TokenGroup boost handling
   Add a focused test reproducing the issue
   
   Risks
   The change is small and limited to FVH internals, and should be safe to backport to 10.3.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Fix/fvh boost issue [lucene]

Posted by "yangfeng123456 (via GitHub)" <gi...@apache.org>.
yangfeng123456 closed pull request #15604: Fix/fvh boost issue
URL: https://github.com/apache/lucene/pull/15604


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Fix/fvh boost issue [lucene]

Posted by "yangfeng123456 (via GitHub)" <gi...@apache.org>.
yangfeng123456 commented on PR #15604:
URL: https://github.com/apache/lucene/pull/15604#issuecomment-3821708122

   > Thanks @yangfeng123456 for this contribution. While the change itself looks fine to me, I am wondering if `branch_10_3` is the right place for this. `10.4` is already being discussed, so it should be part of `main` and `branch_10_x`
   
   Thanks for the suggestion earlier. I’ve resubmitted the change based on main here: #15635


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Fix/fvh boost issue [lucene]

Posted by "yangfeng123456 (via GitHub)" <gi...@apache.org>.
yangfeng123456 closed pull request #15604: Fix/fvh boost issue
URL: https://github.com/apache/lucene/pull/15604


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Fix/fvh boost issue [lucene]

Posted by "yangfeng123456 (via GitHub)" <gi...@apache.org>.
yangfeng123456 commented on PR #15604:
URL: https://github.com/apache/lucene/pull/15604#issuecomment-3789527347

   1


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Fix/fvh boost issue [lucene]

Posted by "yangfeng123456 (via GitHub)" <gi...@apache.org>.
yangfeng123456 commented on PR #15604:
URL: https://github.com/apache/lucene/pull/15604#issuecomment-3802674597

   Hi @dweiss  @dsmiley @jainankitk ,
   This PR fixes the FastVectorHighlighter boost issue (related issue: https://github.com/apache/lucene/issues/15442) by preserving boost values when merging overlapping phrases. A unit test has been added to cover this case.
   CI has passed, and the changes are small, limited to FVH internals.
   I would greatly appreciate it if you could review this PR at your convenience. Thank you very much! I’ll address any feedback promptly.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Fix/fvh boost issue [lucene]

Posted by "yangfeng123456 (via GitHub)" <gi...@apache.org>.
yangfeng123456 commented on PR #15604:
URL: https://github.com/apache/lucene/pull/15604#issuecomment-3821126982

   > Thanks @yangfeng123456 for this contribution. While the change itself looks fine to me, I am wondering if `branch_10_3` is the right place for this. `10.4` is already being discussed, so it should be part of `main` and `branch_10_x`
   
   Thanks for the feedback! I’ll close this PR and resubmit the fix based on main as suggested.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Fix/fvh boost issue [lucene]

Posted by "yangfeng123456 (via GitHub)" <gi...@apache.org>.
yangfeng123456 closed pull request #15604: Fix/fvh boost issue
URL: https://github.com/apache/lucene/pull/15604


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Fix/fvh boost issue [lucene]

Posted by "yangfeng123456 (via GitHub)" <gi...@apache.org>.
yangfeng123456 commented on PR #15604:
URL: https://github.com/apache/lucene/pull/15604#issuecomment-3802552256

   Hi @dweiss @dsmiley ,
   This PR fixes the FastVectorHighlighter boost issue (related issue: #15442) by preserving boost values when merging overlapping phrases. A unit test has been added to cover this case.
   CI has passed, and the changes are small, limited to FVH internals.
   I would greatly appreciate it if you could review this PR at your convenience. Thank you very much! I’ll address any feedback promptly.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Fix/fvh boost issue [lucene]

Posted by "yangfeng123456 (via GitHub)" <gi...@apache.org>.
yangfeng123456 closed pull request #15604: Fix/fvh boost issue
URL: https://github.com/apache/lucene/pull/15604


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org