-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the searchForFacetValues method for Meilisearch v1.3.0 (#1513)
* Add the searchForFacetValue method * Update version for the next release (v0.33.0-prototype-search-for-facet-values.0) (#1514) * Update package.json * Update src/package-version.ts * Change name of searchForFacetValue to searchForFacetValues * Add error codes * Remove only label on test * Fix the typing of the search parameters * Remove unecessary INVALID_SEARCH_FACET error * Fix tests * Update returned fields from hits to facetHits and query to facetQuery * Update version for the next release (vv0.33.0-prototype-search-for-facet-values.1) (#1515) * Update package.json * Update src/package-version.ts --------- Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com> * Apply suggestions from code review * Update README.md Co-authored-by: Bruno Casali <brunoocasali@gmail.com> --------- Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
- Loading branch information
1 parent
13846f0
commit b61a8e5
Showing
5 changed files
with
369 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Test on POST search Admin key: basic facet value search 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "action", | ||
}, | ||
Object { | ||
"count": 2, | ||
"value": "adventure", | ||
}, | ||
], | ||
"facetQuery": "a", | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Admin key: facet value search with filter 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "action", | ||
}, | ||
], | ||
"facetQuery": "a", | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Admin key: facet value search with no facet query 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "action", | ||
}, | ||
Object { | ||
"count": 2, | ||
"value": "adventure", | ||
}, | ||
Object { | ||
"count": 1, | ||
"value": "comedy", | ||
}, | ||
Object { | ||
"count": 2, | ||
"value": "romance", | ||
}, | ||
], | ||
"facetQuery": null, | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Admin key: facet value search with search query 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "adventure", | ||
}, | ||
], | ||
"facetQuery": "a", | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Master key: basic facet value search 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "action", | ||
}, | ||
Object { | ||
"count": 2, | ||
"value": "adventure", | ||
}, | ||
], | ||
"facetQuery": "a", | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Master key: facet value search with filter 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "action", | ||
}, | ||
], | ||
"facetQuery": "a", | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Master key: facet value search with no facet query 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "action", | ||
}, | ||
Object { | ||
"count": 2, | ||
"value": "adventure", | ||
}, | ||
Object { | ||
"count": 1, | ||
"value": "comedy", | ||
}, | ||
Object { | ||
"count": 2, | ||
"value": "romance", | ||
}, | ||
], | ||
"facetQuery": null, | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Master key: facet value search with search query 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "adventure", | ||
}, | ||
], | ||
"facetQuery": "a", | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Search key: basic facet value search 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "action", | ||
}, | ||
Object { | ||
"count": 2, | ||
"value": "adventure", | ||
}, | ||
], | ||
"facetQuery": "a", | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Search key: facet value search with filter 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "action", | ||
}, | ||
], | ||
"facetQuery": "a", | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Search key: facet value search with no facet query 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "action", | ||
}, | ||
Object { | ||
"count": 2, | ||
"value": "adventure", | ||
}, | ||
Object { | ||
"count": 1, | ||
"value": "comedy", | ||
}, | ||
Object { | ||
"count": 2, | ||
"value": "romance", | ||
}, | ||
], | ||
"facetQuery": null, | ||
"processingTimeMs": 0, | ||
} | ||
`; | ||
|
||
exports[`Test on POST search Search key: facet value search with search query 1`] = ` | ||
Object { | ||
"facetHits": Array [ | ||
Object { | ||
"count": 1, | ||
"value": "adventure", | ||
}, | ||
], | ||
"facetQuery": "a", | ||
"processingTimeMs": 0, | ||
} | ||
`; |
Oops, something went wrong.