File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -30,18 +30,24 @@ export function instantMeiliSearch(
30
30
attributesToSnippet : attributesToCrop ,
31
31
attributesToRetrieve,
32
32
attributesToHighlight,
33
- filters,
33
+ filters = '' ,
34
+ numericFilters = [ ] ,
34
35
} ) {
35
36
const limit = this . paginationTotalHits
36
37
38
+ const filter = [ numericFilters . join ( ' AND ' ) , filters . trim ( ) ]
39
+ . filter ( ( x ) => x )
40
+ . join ( ' AND ' )
41
+ . trim ( )
42
+
37
43
// Creates search params object compliant with MeiliSearch
38
44
return {
39
45
q : query ,
40
46
...( facets ?. length && { facetsDistribution : facets } ) ,
41
47
...( facetFilters && { facetFilters } ) ,
42
48
...( attributesToCrop && { attributesToCrop } ) ,
43
49
...( attributesToRetrieve && { attributesToRetrieve } ) ,
44
- ...( filters && { filters } ) ,
50
+ ...( filter && { filters : filter } ) ,
45
51
attributesToHighlight : attributesToHighlight || [ '*' ] ,
46
52
limit : ( ! this . placeholderSearch && query === '' ) || ! limit ? 0 : limit ,
47
53
}
You can’t perform that action at this time.
0 commit comments