Repository navigation
Add phrase match weights for full-query ranking - #15863
Closed
adnankussair wants to merge 1 commit into
Closed
adnankussair wants to merge 1 commit into
adnankussair wants to merge 1 commit into
Conversation
partial_whole counts every query word, so a repeated word can outrank a field that contains the full query. phrase and phrase_start count only that full query and default to 0. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Docs: statamic/docs#2026 |
2 tasks
Author
|
Closing this draft for now. We want Erin to review the Comb change before it goes up as a PR in statamic/cms. The branch stays on the fork for that review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
phraseandphrase_startmatch weights to Comb. They count only when a query chunk contains a space, so a field that contains or starts with the full query can be ranked on its own.0, so existing scores stay the same until a site sets them.partial_wholeandpartial_whole_startare unchanged and still count every query word.Test plan
tests/Search/CombTest.php: defaultphraseandphrase_startare0, and setting them to0leaves scores unchangedphraseputs the full-query title first and leaves the repeated-word score unchangedDocs: statamic/docs PR lists the two weights next to the existing nine.
Made with Cursor