-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1030: Changes related to the next Meilisearch release (v1.1.0) r=bidoubiwa a=meili-bot Related to this issue: meilisearch/integration-guides#251 This PR: - gathers the changes related to the next Meilisearch release (v1.1.0) so that this package is ready when the official release is out. - should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases). - might eventually contain test failures until the Meilisearch v1.1.0 is out.⚠️ This PR should NOT be merged until the next release of Meilisearch (v1.1.0) is out. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/main/resources/pre-release-week.md) purpose._ Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com> Co-authored-by: Charlotte Vermandel <charlottevermandel@gmail.com>
- Loading branch information
Showing
31 changed files
with
612 additions
and
526 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@meilisearch/instant-meilisearch": minor | ||
--- | ||
|
||
Replaces search with multiSearch API. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@meilisearch/instant-meilisearch": patch | ||
--- | ||
|
||
Use the `_geoBoundingBox` filter to adapt the `insideBoundingBox`parameter |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@meilisearch/instant-meilisearch": patch | ||
--- | ||
|
||
Add the facetStats of numeric facets, giving access to the min and max value of these facets. | ||
The following widgets are now compatible with Meilisearch: `RangeSlider` and `RangeInput` |
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
68 changes: 68 additions & 0 deletions
68
packages/instant-meilisearch/__tests__/facet-stats.test.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { searchClient, dataset, meilisearchClient } from './assets/utils' | ||
|
||
describe('Facet stats tests', () => { | ||
beforeAll(async () => { | ||
const deleteTask = await meilisearchClient.deleteIndex('movies') | ||
await meilisearchClient.waitForTask(deleteTask.taskUid) | ||
await meilisearchClient | ||
.index('movies') | ||
.updateFilterableAttributes(['genres', 'release_date', 'id']) | ||
const documentsTask = await meilisearchClient | ||
.index('movies') | ||
.addDocuments(dataset) | ||
await meilisearchClient.index('movies').waitForTask(documentsTask.taskUid) | ||
}) | ||
|
||
test('Facet stats on an empty facets array', async () => { | ||
const response = await searchClient.search([ | ||
{ | ||
indexName: 'movies', | ||
params: { | ||
query: '', | ||
facets: [], | ||
}, | ||
}, | ||
]) | ||
|
||
expect(response.results[0].facets_stats?.release_date).toEqual(undefined) | ||
}) | ||
|
||
test('Facet stats on a facet with no numeric values', async () => { | ||
const response = await searchClient.search([ | ||
{ | ||
indexName: 'movies', | ||
params: { | ||
query: '', | ||
facets: ['genres'], | ||
}, | ||
}, | ||
]) | ||
|
||
expect(response.results[0].facets_stats?.genres).toEqual(undefined) | ||
}) | ||
|
||
test('Facet stats on two facet', async () => { | ||
const response = await searchClient.search([ | ||
{ | ||
indexName: 'movies', | ||
params: { | ||
query: '', | ||
facets: ['release_date', 'id'], | ||
}, | ||
}, | ||
]) | ||
|
||
expect(response.results[0].facets_stats?.release_date).toEqual({ | ||
avg: 0, | ||
max: 1065744000, | ||
min: 233366400, | ||
sum: 0, | ||
}) | ||
expect(response.results[0].facets_stats?.id).toEqual({ | ||
avg: 0, | ||
max: 30, | ||
min: 2, | ||
sum: 0, | ||
}) | ||
}) | ||
}) |
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
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
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
Oops, something went wrong.