typesense-instantsearch-adapter 2.6.0-1 → 2.7.0-0

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 CHANGED
@@ -369,8 +369,8 @@ const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
369
369
 
370
370
  > Available as of Typesense Server `v0.25.0.rc12`
371
371
 
372
- This [`dynamicWidgets`](https://www.algolia.com/doc/api-reference/widgets/dynamic-facets/js/) widget works out of the box with no additional changes,
373
- but if you want to control the order in which these facets are displayed in the UI
372
+ This [`dynamicWidgets`](https://www.algolia.com/doc/api-reference/widgets/dynamic-facets/js/) widget works out of the box with no additional changes,
373
+ but if you want to control the order in which these facets are displayed in the UI
374
374
  Instantsearch expects a parameter called [`renderingContent`](https://www.algolia.com/doc/api-reference/api-parameters/renderingContent/) to be set.
375
375
 
376
376
  ```js
@@ -386,7 +386,8 @@ const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
386
386
  },
387
387
  ],
388
388
  },
389
- renderingContent: { // <<===== Add this, only if you want to control the order of the widgets displayed by dynamicWidgets
389
+ renderingContent: {
390
+ // <<===== Add this, only if you want to control the order of the widgets displayed by dynamicWidgets
390
391
  facetOrdering: {
391
392
  facets: {
392
393
  order: ["size", "brand"], // <<===== Change this as needed
@@ -2843,7 +2843,8 @@ var SearchResponseAdapter = /*#__PURE__*/function () {
2843
2843
 
2844
2844
  adaptedHit.objectID = typesenseHit.document.id;
2845
2845
  adaptedHit._snippetResult = _this2._adaptHighlightResult(typesenseHit, "snippet");
2846
- adaptedHit._highlightResult = _this2._adaptHighlightResult(typesenseHit, "value"); // Add metadata fields to result, if a field with that name doesn't already exist
2846
+ adaptedHit._highlightResult = _this2._adaptHighlightResult(typesenseHit, "value");
2847
+ adaptedHit._rawTypesenseHit = typesenseHit; // Add metadata fields to result, if a field with that name doesn't already exist
2847
2848
 
2848
2849
  ["text_match", "geo_distance_meters", "curated", "text_match_info"].forEach(function (metadataField) {
2849
2850
  if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {