Skip to content

Commit

Permalink
Allow facet_by to be overriden
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbosco committed Dec 18, 2023
1 parent 57c9a54 commit bd74056
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 16 deletions.
10 changes: 8 additions & 2 deletions dist/typesense-instantsearch-adapter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/typesense-instantsearch-adapter.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/typesense-instantsearch-adapter.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/typesense-instantsearch-adapter.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/SearchRequestAdapter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/SearchRequestAdapter.js.map

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"webpack-cli": "^4.9.2"
},
"dependencies": {
"typesense": "^1.7.1"
"typesense": "^1.7.2"
},
"peerDependencies": {
"@babel/runtime": "^7.17.2"
Expand Down
2 changes: 1 addition & 1 deletion src/SearchRequestAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export class SearchRequestAdapter {
Object.assign(typesenseSearchParams, {
collection: adaptedCollectionName,
q: params.query === "" || params.query === undefined ? "*" : params.query,
facet_by: this._adaptFacetBy(params.facets),
facet_by: this._adaptFacetBy(params.facets) || snakeCasedAdditionalSearchParameters.facet_by,
filter_by: this._adaptFilters(params) || snakeCasedAdditionalSearchParameters.filter_by,
sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,
max_facet_values: params.maxValuesPerFacet,
Expand Down

0 comments on commit bd74056

Please sign in to comment.