Faceted Search
Search for content instance documents
The search request returns content instance documents matching search criteria. The results are filtered, sorted, grouped, and annotated. In addition to the search engine, which returns assets matching the search query, Search also supports search
phrase suggestions. Based on an (incomplete) search term which suggests complete search phrases together with the asset attribute name the phrase was found in.
Search for a keyword
GET https://<base-url>/stores-active/contentInstance/event/search-phrase/big%20bang
Retrieve the specified number of search phrase suggestions from a limited set of attributes
GET https://<base-url>/stores-active/contentInstance/event/search-phrase/gir?numberOfResults=3&attributes=["searchableTitles.*"]
Search for a program title
GET https://<base-url>/stores-active/contentInstance/event/search?query=terminator&attributes=["searchableTitles.*"]
Search for a contributor
GET https://<base-url>/stores-active/contributor/search?query=spacey&annotation={"unconditionalAttributes":["contributorNames","contributorId"]}
The Search Engine offers intelligent free text search capabilities among the assets in the asset store. Autocompletion and auto-correction are supported.
| search for an exact word or phrase | Use double quotes “ |
| Include a word | Add a plus before the word to indicate that the word is mandatory |
| Exclude a word | Add a dash – before the word to exclude all assets containing the word |
| wildcards | * and ? wildcards represent arbitrary terms or characters, respectively |
| logical operators | AND, OR, NOT, note that logical operators have to be in CAPITAL letters |
| parentheses | ( and ) may be used to control the sequence of evaluation |
| search within specific fields | Use the asset attribute name followed by a colon and the desired asset attribute value to search in specific fields only. In case of hierarchical asset attributes the dot notation is supported (e.g. persons.actor:eastwood) |
Search for an exact word or phrase
Seach for exact word or phrase in the store. This will help to find set of words or find the exact word in the store.
GET https://<base-url>/stores-active/contentinstance/program/search?filter={"operator":"and","criteria":[{"operator":"exists","term":"images"}]}&annotation={"unconditionalAttributes":["searchableTitles"]}&query=\"two\"&attributeWeights={"searchableTitles.value.*":1}
GET https://<base-url>/stores-active/contentinstance/program/search?filter={"operator":"and","criteria":[{"operator":"exists","term":"images"}]}&annotation={"unconditionalAttributes":["searchableTitles"]}&query=\"game of thrones\"&attributeWeights={"searchableTitles.value.*":1}
Include a word or Exclude a word
Add a plus(+) before the word to indicate that the word is mandatory. Add a dash – before the word to exclude all assets containing the word. This will help to include combination of words and exclude more words.
GET https://<base-url>//stores-active/contentinstance/event/search?filter={"operator":"and","criteria":[{"operator":"exists","term":"images"}]}&annotation={"unconditionalAttributes":["searchableTitles"]}&query='(at+Bucks)'&attributeWeights={"searchableTitles.value.en":1}&numberOfResults=20
GET https://<base-url>/stores-active/contentinstance/program/search?filter={"operator":"and","criteria":[{"operator":"exists","term":"images"}]}&annotation={"unconditionalAttributes":["searchableTitles"]}&query=-the post&attributeWeights={"searchableTitles.value.*":1}&numberOfResults=20
Wildcards
Wild card search is a pattern kind of search. * and ? wildcards represent arbitrary terms or characters, respectively.
- ? matches exactly one non-space character
-
- matches zero or more non-space characters
For example, he* will match any word starting with he, such as he, her, help, hello, helicopter, and so on. On the other hand, he? will only match three-letter words starting with he, such as hem, hen, and so on.
You can use this at the end of words as well. I’m search for the word which ends with ville.
GET https://<base-url>/stores-active/contentinstance/program/search?filter={"operator":"and","criteria":[{"operator":"exists","term":"images"}]}&annotation={"unconditionalAttributes":["searchableTitles"]}&query=*ville&attributeWeights={"searchableTitles.value.en":1}&numberOfResults=20
? aslo works in the same way but the length is just. May be used for plural words. The below url search for the with the query ‘fun?y’ (the results will have funny or funky in the titles”
GET https://<base-url>/stores-active/contentinstance/event/search?filter={"operator":"and","criteria":[{"operator":"exists","term":"images"}]}&annotation={"unconditionalAttributes":["searchableTitles"]}&query=fun?y&attributeWeights={"searchableTitles.value.*":1}&numberOfResults=20
Search within specific fields
Use the asset attribute name followed by a colon and the desired asset attribute value to search in specific fields only. In case of hierarchical asset attributes the dot notation is supported (e.g.persons.actor:eastwood)
The below url is used to search exact word “friends” in the searchableTitles.value.en
GET https://<base-url>/stores-active/contentInstance/program/search?query=searchableTitles.value.en:two&annotation={"unconditionalAttributes": ["searchableTitles"]}
AND, OR, NOT, note that logical operators have to be in CAPITAL letters
This will be helpful to combine two or more about search. The operators are used to combine the above search types.
GET https://<base-url>/stores-active/contentInstance/program/search?query=(searchableTitles.value.en:blue)AND(NOT(searchableTitles.type:episode))&numberOfResults=5&annotation={"unconditionalAttributes": ["searchableTitles"]}