add: request + response interface changes

This commit is contained in:
zakariaelas committed 2021-09-27 12:42:10 +01:00
1 parent 24eecd2922
commit 9b6d0c7334
4 files changed
+19 -11

No files matched your search

@@ -73,9 +73,10 @@ class SearchService extends BaseService {
* Used to search for a document in an index
* @param indexName {string} - the index name
* @param query {string} - the search query
* @param options {object} - any options passed to the request object other than the query and indexName
* e.g. pagination options, filtering options, etc
* @return {Promise<{object}>} - returns response from search engine provider
* @param options {{ paginationOptions: { limit: number, offset: number }, filter: string, additionalOptions: any}}
* - any options passed to the request object other than the query and indexName
* - additionalOptions contain any provider specific options
* @return {Promise<{ hits: any[]; [k: string]: any; }>} returns response from search engine provider
*/
search(indexName, query, options) {
throw Error("search must be overridden by a child class")