typesense-instantsearch-adapter 2.7.1-4 → 2.7.1
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 +30 -1
- package/dist/typesense-instantsearch-adapter.js +970 -1067
- package/dist/typesense-instantsearch-adapter.js.map +1 -1
- package/dist/typesense-instantsearch-adapter.min.js +2 -1
- package/dist/typesense-instantsearch-adapter.min.js.LICENSE.txt +1 -0
- package/dist/typesense-instantsearch-adapter.min.js.map +1 -1
- package/lib/SearchRequestAdapter.js +26 -28
- package/lib/SearchRequestAdapter.js.map +1 -1
- package/lib/SearchResponseAdapter.js +2 -2
- package/lib/SearchResponseAdapter.js.map +1 -1
- package/lib/TypesenseInstantsearchAdapter.js +65 -71
- package/lib/TypesenseInstantsearchAdapter.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -444,6 +444,34 @@ Read more about all available options for `renderingContent` in [Algolia's docum
|
|
|
444
444
|
});
|
|
445
445
|
```
|
|
446
446
|
|
|
447
|
+
### Grouped Hits
|
|
448
|
+
|
|
449
|
+
> Available as of typesense-instantsearch-adapter `2.7.1-4`
|
|
450
|
+
|
|
451
|
+
By default, when `group_by` is used as a search parameters, the adapter flattens the results across all groups into a single list of sequential hits.
|
|
452
|
+
|
|
453
|
+
If you'd like to preserve the groups, you want to set `flattenGroupedHits: false` when instantiating the adapter.
|
|
454
|
+
|
|
455
|
+
This will place the first hit in a group as the primary hit, and then add all hits in the group inside a `_grouped_hits` key inside each hit.
|
|
456
|
+
|
|
457
|
+
```js
|
|
458
|
+
const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
|
|
459
|
+
server: {
|
|
460
|
+
apiKey: "xyz",
|
|
461
|
+
nodes: [
|
|
462
|
+
{
|
|
463
|
+
host: "localhost",
|
|
464
|
+
port: "8108",
|
|
465
|
+
path: "/",
|
|
466
|
+
protocol: "http",
|
|
467
|
+
},
|
|
468
|
+
],
|
|
469
|
+
},
|
|
470
|
+
flattenGroupedHits: false, // <=======
|
|
471
|
+
additionalSearchParameters,
|
|
472
|
+
});
|
|
473
|
+
```
|
|
474
|
+
|
|
447
475
|
### Vector Search
|
|
448
476
|
|
|
449
477
|
> Available as of typesense-instantsearch-adapter `2.7.0-3`
|
|
@@ -507,7 +535,8 @@ const search = instantsearch({
|
|
|
507
535
|
## Compatibility
|
|
508
536
|
|
|
509
537
|
| Typesense Server | typesense-instantsearch-adapter | instantsearch.js | react-instantsearch | vue-instantsearch | angular-instantsearch |
|
|
510
|
-
|
|
538
|
+
|------------------|---------------------------------|------------------|---------------------|-------------------|-----------------------|
|
|
539
|
+
| \>= v0.25.0 | \>= v2.7.1 | \>= 4.51 | \>= 6.39 | \>= 4.8 | \>= 4.4 |
|
|
511
540
|
| \>= v0.25.0.rc14 | \>= v2.7.0-1 | \>= 4.51 | \>= 6.39 | \>= 4.8 | \>= 4.4 |
|
|
512
541
|
| \>= v0.25.0.rc12 | \>= v2.6.0 | \>= 4.51 | \>= 6.39 | \>= 4.8 | \>= 4.4 |
|
|
513
542
|
| \>= v0.24 | \>= v2.5.0 | \>= 4.2.0 | \>= 6.0.0 | \>= 2.2.1 | \>= 3.0.0 |
|