AbstractSearchService

AbstractSearchService ⇐ Abstract

Kind: global abstract class
Extends: Abstract
Service:

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

ParamTypeDefaultDescription
textString

Text to search

[options]Object

some options

[options.start]number0

index of the first content to retrieve

[options.number]number10

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

ParamTypeDefaultDescription
[options]Object

some options

[options.start]number0

index of the first content to retrieve

[options.number]number10

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

ParamTypeDefaultDescription
textString

Text to search

[options]Object

some options

[options.start]number0

index of the first content to retrieve

[options.number]number10

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

ParamTypeDefaultDescription
[options]Object

some options

[options.start]number0

index of the first content to retrieve

[options.number]number10

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

ParamTypeDescription
contentObject

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

ParamTypeDefaultDescription
[options]Object

some options

[options.start]number0

index of the first content to retrieve

[options.number]number10

number of contents to retrieve.