@seekora-ai/ui-sdk-core 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.js CHANGED
@@ -1782,6 +1782,30 @@ class SearchStateManager {
1782
1782
  throw error;
1783
1783
  }
1784
1784
  }
1785
+ /**
1786
+ * Execute multiple search queries in a single request.
1787
+ * Each result gets its own SearchContext for independent analytics tracking.
1788
+ * Useful for federated search (e.g., products + articles + suggestions in one call).
1789
+ *
1790
+ * @param queries - Array of 1-10 search queries
1791
+ * @returns MultiSearchResponse with per-query results
1792
+ */
1793
+ async multiSearch(queries) {
1794
+ log.verbose('SearchStateManager: Performing multi-search', { queryCount: queries.length });
1795
+ try {
1796
+ const response = await this.client.multiSearch(queries);
1797
+ log.info('SearchStateManager: Multi-search completed', {
1798
+ queryCount: queries.length,
1799
+ totalResults: response.results.map((r) => r.totalResults),
1800
+ });
1801
+ return response;
1802
+ }
1803
+ catch (err) {
1804
+ const error = err instanceof Error ? err : new Error(String(err));
1805
+ log.error('SearchStateManager: Multi-search failed', { error: error.message });
1806
+ throw error;
1807
+ }
1808
+ }
1785
1809
  // Clear all state
1786
1810
  clear() {
1787
1811
  this.state = {