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