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 1
1
export * from './to-meilisearch-params'
2
- export * from './to-meilisearch-filters'
3
2
export * from './to-instantsearch-response'
4
3
export * from './to-instantsearch-hits'
5
4
export * from './to-instantsearch-highlight'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import { AdaptToMeiliSearchParams } from '../types'
2
- import { mergeFiltersAndNumericFilters } from './to-meilisearch-filters'
3
2
4
3
export const adaptToMeiliSearchParams : AdaptToMeiliSearchParams = function (
5
4
{
@@ -15,7 +14,10 @@ export const adaptToMeiliSearchParams: AdaptToMeiliSearchParams = function (
15
14
{ paginationTotalHits, placeholderSearch }
16
15
) {
17
16
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 ( )
19
21
20
22
// Creates search params object compliant with MeiliSearch
21
23
return {
Original file line number Diff line number Diff line change @@ -71,11 +71,6 @@ export type ReplaceHighlightTags = (
71
71
highlightPostTag ?: string
72
72
) => string
73
73
74
- export type MergeFiltersAndNumericFilters = (
75
- filters ?: string ,
76
- numericFilters ?: string [ ]
77
- ) => string
78
-
79
74
export type CreateSnippetResult = (
80
75
snippetsParams : HighLightParams & SnippetsParams & FormattedHit
81
76
) => { formattedHit : any } & IMSearchParams
You can’t perform that action at this time.
0 commit comments