@seekora-ai/ui-sdk-react 0.2.30 → 0.2.31
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/index.umd.js +1 -1
- package/dist/src/index.esm.js +24 -0
- package/dist/src/index.esm.js.map +1 -1
- package/dist/src/index.js +24 -0
- package/dist/src/index.js.map +1 -1
- package/package.json +5 -5
package/dist/src/index.js
CHANGED
|
@@ -691,6 +691,30 @@ class SearchStateManager {
|
|
|
691
691
|
throw error;
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
+
/**
|
|
695
|
+
* Execute multiple search queries in a single request.
|
|
696
|
+
* Each result gets its own SearchContext for independent analytics tracking.
|
|
697
|
+
* Useful for federated search (e.g., products + articles + suggestions in one call).
|
|
698
|
+
*
|
|
699
|
+
* @param queries - Array of 1-10 search queries
|
|
700
|
+
* @returns MultiSearchResponse with per-query results
|
|
701
|
+
*/
|
|
702
|
+
async multiSearch(queries) {
|
|
703
|
+
log.verbose('SearchStateManager: Performing multi-search', { queryCount: queries.length });
|
|
704
|
+
try {
|
|
705
|
+
const response = await this.client.multiSearch(queries);
|
|
706
|
+
log.info('SearchStateManager: Multi-search completed', {
|
|
707
|
+
queryCount: queries.length,
|
|
708
|
+
totalResults: response.results.map((r) => r.totalResults),
|
|
709
|
+
});
|
|
710
|
+
return response;
|
|
711
|
+
}
|
|
712
|
+
catch (err) {
|
|
713
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
714
|
+
log.error('SearchStateManager: Multi-search failed', { error: error.message });
|
|
715
|
+
throw error;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
694
718
|
// Clear all state
|
|
695
719
|
clear() {
|
|
696
720
|
this.state = {
|