typesense-instantsearch-adapter 2.4.1-1 → 2.4.1-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 +12 -2
- package/dist/typesense-instantsearch-adapter.min.js +1 -1
- package/dist/typesense-instantsearch-adapter.min.js.map +1 -1
- package/lib/Configuration.js +6 -2
- package/lib/Configuration.js.map +1 -1
- package/lib/SearchRequestAdapter.js +10 -2
- package/lib/SearchRequestAdapter.js.map +1 -1
- package/lib/SearchResponseAdapter.js +6 -5
- package/lib/SearchResponseAdapter.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@ An adapter to use the awesome [Instantsearch.js](https://github.com/algolia/inst
|
|
|
7
7
|
|
|
8
8
|
Here is an example of UI you can build with this adapater: [songs-search.typesense.org](https://songs-search.typesense.org)
|
|
9
9
|
|
|
10
|
+
**Note:** If your search interface is built on a custom autocomplete component, or is based on [@algolia/autocomplete-js](https://www.algolia.com/doc/ui-libraries/autocomplete/introduction/what-is-autocomplete/), then you don't need this adapter to use it with Typesense, as [typesense-js](https://github.com/typesense/typesense-js) library already supports client-side fetching data from any async data sources. Read more [here](https://github.com/typesense/typesense-instantsearch-adapter/issues/88#issuecomment-1021597634).
|
|
11
|
+
|
|
10
12
|
## Quick Links
|
|
11
13
|
|
|
12
14
|
- [Background](#background)
|
|
@@ -15,7 +17,7 @@ Here is an example of UI you can build with this adapater: [songs-search.typesen
|
|
|
15
17
|
- [Installation](#installation)
|
|
16
18
|
- [Usage](#usage)
|
|
17
19
|
- [With instantsearch.js](#with-instantsearchjs)
|
|
18
|
-
- [With react-instantsearch](#with-react-instantsearch)
|
|
20
|
+
- [With react-instantsearch](#with-react-instantsearch) (also works with React Native)
|
|
19
21
|
- [With vue-instantsearch](#with-vue-instantsearch)
|
|
20
22
|
- [With angular-instantsearch](#with-angular-instantsearch)
|
|
21
23
|
- [Widget Specific Instructions](#widget-specific-instructions)
|
|
@@ -167,6 +169,8 @@ const App = () => (
|
|
|
167
169
|
|
|
168
170
|
You can then add any of the Instantsearch-React widgets [here](https://www.algolia.com/doc/guides/building-search-ui/widgets/showcase/react/) that are [supported](#widget-compatibility) by the adapter.
|
|
169
171
|
|
|
172
|
+
The instructions above also apply to React Native.
|
|
173
|
+
|
|
170
174
|
### With [vue-instantsearch](https://github.com/algolia/vue-instantsearch)
|
|
171
175
|
|
|
172
176
|
App.vue:
|
|
@@ -297,7 +301,13 @@ The generalized pattern for the value attribute is: `<index_name>[/sort/<sort_by
|
|
|
297
301
|
|
|
298
302
|
### `configure`
|
|
299
303
|
|
|
300
|
-
If you need to specify a `filter_by` search parameter for Typesense, you want to use the
|
|
304
|
+
If you need to specify a `filter_by` search parameter for Typesense, you want to use the `configure` InstantSearch widget, along with `facetFilters`, `numericFilters` or `filters`.
|
|
305
|
+
|
|
306
|
+
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/).
|
|
307
|
+
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).
|
|
308
|
+
|
|
309
|
+
Setting `filter_by` inside the `additionalQueryParameters` config only works when the widgets are loaded initially, because InstantSearch internally overrides the `filter_by` field subsequently.
|
|
310
|
+
Read more [here](https://github.com/typesense/typesense-instantsearch-adapter/issues/17#issuecomment-746912375).
|
|
301
311
|
|
|
302
312
|
### `index`
|
|
303
313
|
|