MCPcopy Create free account
hub / github.com/ember-learn/ember-api-docs / search

Method search

app/services/algolia.js:6–19  ·  view source on GitHub ↗
(query, params)

Source from the content-addressed store, hash-verified

4
5export default class AlgoliaService extends Service {
6 async search(query, params) {
7 if (query) {
8 if (Array.isArray(query) && !params) {
9 // if multiple indices
10 return this._client.search(query);
11 } else if (!params) {
12 // if no params
13 return this.accessIndex(query.indexName).search(query.query);
14 } else {
15 // if params and callback
16 return this.accessIndex(query.indexName).search(query.query, params);
17 }
18 }
19 }
20
21 accessIndex(IndexName) {
22 if (!this._indices[IndexName]) {

Callers 1

doSearchMethod · 0.80

Calls 1

accessIndexMethod · 0.95

Tested by

no test coverage detected