-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat: hybrid search improvements for v1.8.x #1647
Conversation
363d8ab
to
8d368d6
Compare
expect(response).toEqual({ | ||
default: { | ||
...newEmbedder.default, | ||
apiKey: '<yoXXXXX...', |
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.
apiKey is now hidden 🙈 🥳
expect(response).toHaveProperty('hits') | ||
expect(response).toHaveProperty('semanticHitCount') | ||
// Those fields are no longer returned by the search response | ||
// We want to ensure that they don't appear in it anymore | ||
expect(response).not.toHaveProperty('vector') | ||
expect(response).not.toHaveProperty('_semanticScore') |
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.
I test that I retrieve the hits
and semanticHitCount
fields correctly.
And since the vector
and _semanticScore
fields have been removed from the response, I check that I don't retrieve them anymore
test(`${permission} key: search without vectors`, async () => { | ||
const client = await getClient(permission) | ||
const response = await client.index(index.uid).search('prince', {}) | ||
|
||
expect(response).not.toHaveProperty('semanticHitCount') |
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.
Creation of this specific test to make sure that with a "non-vector" search, I don't retrieve the semanticHitCount
field in the response
@@ -146,6 +149,41 @@ describe.each([{ permission: 'Master' }, { permission: 'Admin' }])( | |||
expect(response).toMatchSnapshot() | |||
}) | |||
|
|||
test(`${permission} key: Update embedders settings `, async () => { |
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.
Creation of a new test to test the embedder's addition on the settings
route (it was forgotten previously).
Since it needs the activation of the vectorStore
exp. feature, I thought it would be best to create a specific test for this one
@@ -183,6 +221,29 @@ describe.each([{ permission: 'Master' }, { permission: 'Admin' }])( | |||
expect(response).toMatchSnapshot() | |||
}) | |||
|
|||
test(`${permission} key: Reset embedders settings `, async () => { |
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.
Creation of a new test to test the embedders deletion on the settings
route
8d368d6
to
94b1875
Compare
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!
Merging!
1648: Update version for the next release (v0.39.0) r=brunoocasali a=meili-bot ## 🚀 Enhancements * feat: hybrid search improvements for v1.8.x (#1647) `@mdubus` * Add `null` to Embedder type (#1646) `@amit-ksh` * Add searchCutoffMs index setting (#1643, #1645) `@amit-ksh` ```js client.index('movies').getSearchCutoffMs() client.index('movies').updateSearchCutoffMs(150) client.index('movies').resetSearchCutoffMs() ``` ## ⚙️ Maintenance/misc * Update ESLint, Prettier, TypeScript and fix/improve their configuration files (#1616) `@flevi29` * Fix code style after configuration changes (#1638) `@brunoocasali` Thanks again to `@amit-ksh,` `@brunoocasali,` `@curquiza,` `@flevi29,` `@mdubus,` `@meili-bors[bot]` ! 🎉 Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com>
Pull Request
Related issue
Fixes #1641
What does this PR do?
vector
and_semanticScore
fields from the SearchResponsedistribution
field to all embeddersREST
andOllama
CI fails because of 2 things:
distribution
field is not retrieved correctly on thesettings/embedders
routes (seedistribution
field not retrieved correctly on thesettings/embedders
route meilisearch#4594)Ollama
embedder has missing fields on GET meilisearch#4595 )Once those 2 things are fixed, it should be fine 🙌
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!