File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/instant-meilisearch/src
adapter/search-request-adapter Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,10 @@ export function MeiliParamsCreator(searchContext: SearchContext) {
9696 meiliSearchParams . q = query
9797 } ,
9898 addFacets ( ) {
99- const value = < Mutable < typeof facets > > facets
99+ const value =
100+ overrideParams ?. indexesOverrides ?. [ indexUid ] ?. facets ??
101+ overrideParams ?. facets ??
102+ < Mutable < typeof facets > > facets
100103 if ( value !== undefined ) {
101104 // despite Instantsearch.js typing it as `string[]`,
102105 // it still can send `string`
@@ -131,7 +134,10 @@ export function MeiliParamsCreator(searchContext: SearchContext) {
131134 } ,
132135 addFilters ( ) {
133136 if ( meilisearchFilters . length ) {
134- meiliSearchParams . filter = meilisearchFilters
137+ meiliSearchParams . filter =
138+ overrideParams ?. indexesOverrides ?. [ indexUid ] ?. filter ??
139+ overrideParams ?. filter ??
140+ meilisearchFilters
135141 }
136142 } ,
137143 addAttributesToRetrieve ( ) {
Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ export type InstantSearchParams = NonNullable<
4343
4444type BaseOverridableMeiliSearchSearchParameters = Pick <
4545 MeiliSearchMultiSearchParams ,
46+ | 'sort'
47+ | 'hitsPerPage'
48+ | 'filter'
49+ | 'facets'
4650 | 'attributesToCrop'
4751 | 'attributesToRetrieve'
4852 | 'attributesToSearchOn'
You can’t perform that action at this time.
0 commit comments