From 56265c227799a2e7a711ff0c0ae8589799293998 Mon Sep 17 00:00:00 2001 From: slhale Date: Tue, 4 Aug 2015 11:39:09 -0700 Subject: [PATCH] [Search] Search aggregator return type The search service returns objects containing searchResult objects. --- .../persistence/elastic/src/ElasticsearchSearchProvider.js | 2 +- platform/search/src/GenericSearchProvider.js | 2 +- platform/search/src/SearchAggregator.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/platform/persistence/elastic/src/ElasticsearchSearchProvider.js b/platform/persistence/elastic/src/ElasticsearchSearchProvider.js index 9ab415c671..d33098d4c6 100644 --- a/platform/persistence/elastic/src/ElasticsearchSearchProvider.js +++ b/platform/persistence/elastic/src/ElasticsearchSearchProvider.js @@ -183,7 +183,7 @@ define( * promise for a result object that has the format * {hits: searchResult[], total: number, timedOut: boolean} * where a searchResult has the format - * {id: domainObject ID, object: domainObject, score: number} + * {id: string, object: domainObject, score: number} * * Notes: * * The order of the results is from highest to lowest score, diff --git a/platform/search/src/GenericSearchProvider.js b/platform/search/src/GenericSearchProvider.js index 84d41bbde4..977e6443e0 100644 --- a/platform/search/src/GenericSearchProvider.js +++ b/platform/search/src/GenericSearchProvider.js @@ -201,7 +201,7 @@ define( * Returns a promise for a result object that has the format * {hits: searchResult[], total: number, timedOut: boolean} * where a searchResult has the format - * {id: domainObject ID, object: domainObject, score: number} + * {id: string, object: domainObject, score: number} * * Notes: * * The order of the results is not guarenteed. diff --git a/platform/search/src/SearchAggregator.js b/platform/search/src/SearchAggregator.js index c68adb53ff..da267214bf 100644 --- a/platform/search/src/SearchAggregator.js +++ b/platform/search/src/SearchAggregator.js @@ -128,7 +128,9 @@ define( /** * Sends a query to each of the providers. Returns a promise for * a result object that has the format - * {hits: domainObject[], total: number} + * {hits: searchResult[], total: number, timedOut: boolean} + * where a searchResult has the format + * {id: string, object: domainObject, score: number} * * @param inputText The text input that is the query. * @param maxResults (optional) The maximum number of results