typesense-instantsearch-adapter 3.0.3-2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/typesense-instantsearch-adapter.js +1912 -477
- package/dist/typesense-instantsearch-adapter.js.map +1 -1
- package/dist/typesense-instantsearch-adapter.min.js +1 -1
- package/dist/typesense-instantsearch-adapter.min.js.LICENSE.txt +1 -1
- package/dist/typesense-instantsearch-adapter.min.js.map +1 -1
- package/index.d.ts +5 -0
- package/lib/Configuration.js +3 -1
- package/lib/Configuration.js.map +1 -1
- package/lib/SearchRequestAdapter.js +13 -2
- package/lib/SearchRequestAdapter.js.map +1 -1
- package/package.json +2 -2
- package/src/Configuration.js +2 -0
- package/src/SearchRequestAdapter.js +14 -2
package/README.md
CHANGED
|
@@ -311,6 +311,8 @@ If you need to specify a `filter_by` search parameter for Typesense, you want to
|
|
|
311
311
|
The format for `facetFilters` and `numericFilters` is the same as Algolia's as described [here](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/).
|
|
312
312
|
But `filters` needs to be in Typesense's `filter_by` format as described in this table [here](https://typesense.org/docs/latest/api/documents.html#query-parameters).
|
|
313
313
|
|
|
314
|
+
There's one difference from Algolia's format, for values that look like numbers. Algolia reads `temp:-5` as "exclude 5", but this adapter matches the number -5 by default, as it always has. Set `interpretNegativeNumericFacetFiltersAsExclusions: true` to get Algolia's behavior, then write `temp:\-5` wherever you mean the number, including in `initialUiState` and routed URLs. In a JavaScript string, write `"temp:\\-5"`. Plain `"temp:\-5"` is the same string as `"temp:-5"`. Without the option, you can still exclude 5 with `filters: "temp:!=5"`.
|
|
315
|
+
|
|
314
316
|
Setting `filter_by` inside the `additionalQueryParameters` config only works when the widgets are loaded initially, because InstantSearch internally overrides the `filter_by` field subsequently.
|
|
315
317
|
Read more [here](https://github.com/typesense/typesense-instantsearch-adapter/issues/17#issuecomment-746912375).
|
|
316
318
|
|