File tree Expand file tree Collapse file tree 4 files changed +4
-31
lines changed Expand file tree Collapse file tree 4 files changed +4
-31
lines changed Original file line number Diff line number Diff line change 11export * from './to-meilisearch-params'
2- export * from './to-meilisearch-filters'
32export * from './to-instantsearch-response'
43export * from './to-instantsearch-hits'
54export * from './to-instantsearch-highlight'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import { AdaptToMeiliSearchParams } from '../types'
2- import { mergeFiltersAndNumericFilters } from './to-meilisearch-filters'
32
43export const adaptToMeiliSearchParams : AdaptToMeiliSearchParams = function (
54 {
@@ -15,7 +14,10 @@ export const adaptToMeiliSearchParams: AdaptToMeiliSearchParams = function (
1514 { paginationTotalHits, placeholderSearch }
1615) {
1716 const limit = paginationTotalHits
18- const filter = mergeFiltersAndNumericFilters ( filters , numericFilters )
17+ const filter = [ numericFilters . join ( ' AND ' ) , filters . trim ( ) ]
18+ . filter ( ( x ) => x )
19+ . join ( ' AND ' )
20+ . trim ( )
1921
2022 // Creates search params object compliant with MeiliSearch
2123 return {
Original file line number Diff line number Diff line change @@ -71,11 +71,6 @@ export type ReplaceHighlightTags = (
7171 highlightPostTag ?: string
7272) => string
7373
74- export type MergeFiltersAndNumericFilters = (
75- filters ?: string ,
76- numericFilters ?: string [ ]
77- ) => string
78-
7974export type CreateSnippetResult = (
8075 snippetsParams : HighLightParams & SnippetsParams & FormattedHit
8176) => { formattedHit : any } & IMSearchParams
You can’t perform that action at this time.
0 commit comments