AbstractSearchService
On this page
AbstractSearchService ⇐ Abstract
Kind: global abstract class
Extends: Abstract
Service:
- AbstractSearchService ⇐
Abstract- new AbstractSearchService()
- .search(text, [options]) ⇒
Promise.<Object> - .getTrends([options]) ⇒
Promise.<Object> - ._search(text, [options]) ⇒
Promise.<Array> - ._getTrends([options]) ⇒
Promise.<Object> - ._addToHistory(content, [options]) ⇒
Promise - ._getHistory([options]) ⇒
Promise.<Object>
AbstractSearchService()
Service which handles generic CMS search.
search(text, [options]) ⇒ Promise.<Object>
Search method for Content or Channel or People.
Kind: instance abstract method of AbstractSearchService
Returns: Promise.<Object> - A JavaScript mapped object
Access: protected
| Param | Type | Default | Description |
|---|---|---|---|
| text | String | Text to search | |
| [options] | Object | some options | |
| [options.start] | number | 0 | index of the first content to retrieve |
| [options.number] | number | 10 | number of contents to retrieve. |
getTrends([options]) ⇒ Promise.<Object>
Method which returns an array of trending searches (i.e. an array of mixed type of models: Content, People or Channel) .
Kind: instance method of AbstractSearchService
Returns: Promise.<Object> - A JavaScript mapped object
| Param | Type | Default | Description |
|---|---|---|---|
| [options] | Object | some options | |
| [options.start] | number | 0 | index of the first content to retrieve |
| [options.number] | number | 10 | number of contents to retrieve. |
_search(text, [options]) ⇒ Promise.<Array>
Vendor implementation to search in Content / Channel / People
Kind: instance abstract method of AbstractSearchService
Returns: Promise.<Array> - Returns an array of Content or Channel or People.
Access: protected
| Param | Type | Default | Description |
|---|---|---|---|
| text | String | Text to search | |
| [options] | Object | some options | |
| [options.start] | number | 0 | index of the first content to retrieve |
| [options.number] | number | 10 | number of contents to retrieve. |
_getTrends([options]) ⇒ Promise.<Object>
Vendor implementation to get trending searches in Content / Channel / People.
Kind: instance abstract method of AbstractSearchService
Returns: Promise.<Object> - A JavaScript mapped object
Access: protected
| Param | Type | Default | Description |
|---|---|---|---|
| [options] | Object | some options | |
| [options.start] | number | 0 | index of the first content to retrieve |
| [options.number] | number | 10 | number of contents to retrieve. |
_addToHistory(content, [options]) ⇒ Promise
Vendor implementation to search in Content / Channel / People
Kind: instance abstract method of AbstractSearchService
Access: protected
| Param | Type | Description |
|---|---|---|
| content | Object | Content to save |
| [options] | Object | some options |
_getHistory([options]) ⇒ Promise.<Object>
Vendor implementation to get trending searches in Content / Channel / People.
Kind: instance abstract method of AbstractSearchService
Returns: Promise.<Object> - A JavaScript mapped object
Access: protected
| Param | Type | Default | Description |
|---|---|---|---|
| [options] | Object | some options | |
| [options.start] | number | 0 | index of the first content to retrieve |
| [options.number] | number | 10 | number of contents to retrieve. |