This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
Conversation
This file contains 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
ManyTheFish
force-pushed
the
matching-query-terms-policy
branch
6 times, most recently
from
July 25, 2022 13:50
fc1da78
to
019cd1e
Compare
2 tasks
ManyTheFish
force-pushed
the
matching-query-terms-policy
branch
from
August 18, 2022 15:36
13b1299
to
bff9653
Compare
ManyTheFish
changed the title
Prototype: Matching query terms policy
Matching query terms policy
Aug 22, 2022
ManyTheFish
force-pushed
the
matching-query-terms-policy
branch
from
August 22, 2022 15:40
ebbf2df
to
a21f075
Compare
ManyTheFish
force-pushed
the
matching-query-terms-policy
branch
from
August 22, 2022 15:47
a21f075
to
5391e38
Compare
Kerollmops
approved these changes
Aug 22, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! (please bors)
bors merge
Build succeeded: |
bors bot
added a commit
to meilisearch/meilisearch
that referenced
this pull request
Aug 23, 2022
2636: Upgrade milli to v0.33.0 r=Kerollmops a=ManyTheFish # Summary - Update milli to v0.33.0 - Classify the new InvalidLmdbOpenOptions error as an Internal error - Update filter error check in tests - Introduce Terms Matching Policies fixes #2479 fixes #2484 fixes #2486 fixes #2516 fixes #2578 fixes #2580 fixes #2583 fixes #2600 fixes #2640 fixes #2672 fixes #2679 fixes #2686 # Terms Matching Policies This PR allows end users to customize matching term policies ## Todo - [x] Update the API to return the number of pages and allow users to directly choose a page instead of computing an offset - [x] Change generation of the query tree depending on the chosen settings meilisearch/milli#598 ## Small Documentation ### Default search query **request**: ```sh curl \ -X POST 'http://localhost:7700/indexes/movies/search' \ -H 'Content-Type: application/json' \ --data-binary '{ "q": "doctor of tokio" }' ``` **result**: ```json { "hits":[...], "estimatedTotalHits":32, "query":"doctor of tokio", "limit":20, "offset":0, "processingTimeMs":7 } ``` The default behavior doesn't change with the current Meilisearch behavior: If we don't have enough documents to fit the requested limit, we remove the query words from the last to the first typed word. ## Search query with `optionalWords` parameter **request**: ```sh curl \ -X POST 'http://localhost:7700/indexes/movies/search' \ -H 'Content-Type: application/json' \ --data-binary '{ "q": "doctor of tokio", "matchingStrategy": "all"}' ``` **result**: ```json { "hits":[...], "estimatedTotalHits":1, "query":"doctor of tokio", "limit":20, "offset":0, "processingTimeMs":7 } ``` ### allowed `matchingStrategy` values #### `last` The default behavior, If we don't have enough documents to fit the requested limit, we remove the query words from the last to the first typed word. #### `all` No word will be removed, If we don't have enough documents to fit the requested limit, we return the number of documents we found. ### In charge of the feature Core: `@ManyTheFish` & `@curquiza` Docs: TBD Integration: `@bidoubiwa` Co-authored-by: ManyTheFish <many@meilisearch.com> Co-authored-by: Many the fish <many@meilisearch.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Implement several optional words strategy.
Content
Replace
optional_words
boolean with an enum containing several term matching strategies:All strategies implemented during the prototype are kept, but only
Last
andAll
will be published by Meilisearch in thev0.29.0
release.Related
spec: meilisearch/specifications#173
prototype discussion: meilisearch/meilisearch#2639 (reply in thread)