typesense-instantsearch-adapter 2.5.0-1 → 2.5.0-2
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/dist/typesense-instantsearch-adapter.js +2 -1
- 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.map +1 -1
- package/index.d.ts +1 -0
- package/lib/Configuration.js +1 -0
- package/lib/Configuration.js.map +1 -1
- package/lib/SearchResponseAdapter.js +1 -1
- package/lib/SearchResponseAdapter.js.map +1 -1
- package/package.json +1 -1
- package/src/Configuration.js +2 -0
- package/src/SearchResponseAdapter.js +1 -1
|
@@ -2228,6 +2228,7 @@ var Configuration = /*#__PURE__*/function () {
|
|
|
2228
2228
|
}]
|
|
2229
2229
|
};
|
|
2230
2230
|
this.server.cacheSearchResultsForSeconds = (_this$server$cacheSea = this.server.cacheSearchResultsForSeconds) !== null && _this$server$cacheSea !== void 0 ? _this$server$cacheSea : 2 * 60;
|
|
2231
|
+
this.useHighlightV2Structure = this.options.useHighlightV2Structure || true;
|
|
2231
2232
|
this.additionalSearchParameters = (_options$additionalSe = options.additionalSearchParameters) !== null && _options$additionalSe !== void 0 ? _options$additionalSe : {};
|
|
2232
2233
|
this.additionalSearchParameters.query_by = (_ref = (_this$additionalSearc = this.additionalSearchParameters.queryBy) !== null && _this$additionalSearc !== void 0 ? _this$additionalSearc : this.additionalSearchParameters.query_by) !== null && _ref !== void 0 ? _ref : "";
|
|
2233
2234
|
this.additionalSearchParameters.sort_by = (_ref2 = (_this$additionalSearc2 = this.additionalSearchParameters.sortBy) !== null && _this$additionalSearc2 !== void 0 ? _this$additionalSearc2 : this.additionalSearchParameters.sort_by) !== null && _ref2 !== void 0 ? _ref2 : "";
|
|
@@ -2856,7 +2857,7 @@ var SearchResponseAdapter = /*#__PURE__*/function () {
|
|
|
2856
2857
|
var result = {}; // If there is a highlight object available (as of v0.24.0),
|
|
2857
2858
|
// use that instead of the highlights array, since it supports highlights of nested fields
|
|
2858
2859
|
|
|
2859
|
-
if (typesenseHit.highlight != null) {
|
|
2860
|
+
if (this.configuration.useHighlightV2Structure && typesenseHit.highlight != null) {
|
|
2860
2861
|
this.adaptHighlightObject(typesenseHit, result, snippetOrValue);
|
|
2861
2862
|
} else {
|
|
2862
2863
|
this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);
|