Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'passageSortComparator' option in FieldHighlighter #13276

Conversation

Seunghan-Jung
Copy link
Contributor

Description

FieldHighlighter always sorts the final selected passages based on startOffset, but this may not align with the user's intentions.

For example, in the case of Solr's multiValue fields, the order might just be a simple listing of items without any significance. In such cases, the order in which passages appear is not important. It might be more effective to maintain sorting by score in these situations.

Therefore, it seems necessary to allow for the final sorting criteria to be determined in accordance with the user's intentions.

Copy link

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Apr 20, 2024
@github-actions github-actions bot removed the Stale label Apr 28, 2024
Copy link

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label May 13, 2024
@dsmiley
Copy link
Contributor

dsmiley commented May 23, 2024

I like this change; very nice! I shall merge it. Please share how I shall list you in CHANGES.txt.

Proposed text under improvements to 9.11:

GITHUB#13276: UnifiedHighlighter: new 'passageSortComparator' option to not do offset order (YOUR NAME)

@dsmiley dsmiley self-assigned this May 23, 2024
@dsmiley dsmiley added this to the 9.11.0 milestone May 23, 2024
Seunghan-Jung added a commit to Seunghan-Jung/lucene that referenced this pull request May 23, 2024
@Seunghan-Jung Seunghan-Jung force-pushed the passageSortComparator_option_in_FieldHighlighter branch from 1581e2b to bf6eb2d Compare May 23, 2024 14:51
@dsmiley dsmiley merged commit 8773725 into apache:main May 23, 2024
3 checks passed
dsmiley pushed a commit that referenced this pull request May 24, 2024
new 'passageSortComparator' option to allow sorting other than offset order

(cherry picked from commit 8773725)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants