{"id":714,"date":"2017-04-21T15:33:22","date_gmt":"2017-04-21T15:33:22","guid":{"rendered":"http:\/\/live.ecd-demo.com\/apihelp\/?page_id=714"},"modified":"2025-07-21T17:43:17","modified_gmt":"2025-07-21T17:43:17","slug":"faceted-search","status":"publish","type":"page","link":"https:\/\/apihelp.ecd-demo.com\/index.php\/documentation\/faceted-search\/","title":{"rendered":"Faceted Search"},"content":{"rendered":"<h3>Search for content instance documents<\/h3>\n<p>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<br \/>\nphrase suggestions. Based on an (incomplete) search term which suggests complete search phrases together with the asset attribute name the phrase was found in.<\/p>\n<h4>Search for a keyword<\/h4>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentInstance\/event\/search-phrase\/big%20bang\n<\/code><\/pre>\n<p><strong>Retrieve the specified number of search phrase suggestions from a limited set of attributes<\/strong><\/p>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentInstance\/event\/search-phrase\/gir?numberOfResults=3&amp;attributes=[\"searchableTitles.*\"]\n<\/code><\/pre>\n<h4>Search for a program title<\/h4>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentInstance\/event\/search?query=terminator&amp;attributes=[\"searchableTitles.*\"]\n<\/code><\/pre>\n<h4>Search for a contributor<\/h4>\n<pre><code class=\"swift\">GET  https:\/\/&lt;base-url&gt;\/stores-active\/contributor\/search?query=spacey&amp;annotation={\"unconditionalAttributes\":[\"contributorNames\",\"contributorId\"]}\n<\/code><\/pre>\n<hr \/>\n<p>The Search Engine offers intelligent free text search capabilities among the assets in the asset store. Autocompletion and auto-correction are supported.<\/p>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>search for an exact word or phrase<\/td>\n<td>Use double quotes &#8220;<phrase>&#8221; to search for an exact word or set of words.<\/td>\n<\/tr>\n<tr>\n<td>Include a word<\/td>\n<td>Add a plus before the word to indicate that the word is mandatory<\/td>\n<\/tr>\n<tr>\n<td>Exclude a word<\/td>\n<td>Add a dash \u2013 before the word to exclude all assets containing the word<\/td>\n<\/tr>\n<tr>\n<td>wildcards<\/td>\n<td>* and ? wildcards represent arbitrary terms or characters, respectively<\/td>\n<\/tr>\n<tr>\n<td>logical operators<\/td>\n<td>AND, OR, NOT, note that logical operators have to be in CAPITAL letters<\/td>\n<\/tr>\n<tr>\n<td>parentheses<\/td>\n<td>( and ) may be used to control the sequence of evaluation<\/td>\n<\/tr>\n<tr>\n<td>search within specific fields<\/td>\n<td>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)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>Search for an exact word or phrase<\/h4>\n<p>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.<\/p>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentinstance\/program\/search?filter={\"operator\":\"and\",\"criteria\":[{\"operator\":\"exists\",\"term\":\"images\"}]}&amp;annotation={\"unconditionalAttributes\":[\"searchableTitles\"]}&amp;query=\\\"two\\\"&amp;attributeWeights={\"searchableTitles.value.*\":1}\n<\/code><\/pre>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentinstance\/program\/search?filter={\"operator\":\"and\",\"criteria\":[{\"operator\":\"exists\",\"term\":\"images\"}]}&amp;annotation={\"unconditionalAttributes\":[\"searchableTitles\"]}&amp;query=\\\"game of thrones\\\"&amp;attributeWeights={\"searchableTitles.value.*\":1}\n<\/code><\/pre>\n<h4>Include a word or Exclude a word<\/h4>\n<p>Add a plus(+) before the word to indicate that the word is mandatory. Add a dash \u2013 before the word to exclude all assets containing the word. This will help to include combination of words and exclude more words.<\/p>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/\/stores-active\/contentinstance\/event\/search?filter={\"operator\":\"and\",\"criteria\":[{\"operator\":\"exists\",\"term\":\"images\"}]}&amp;annotation={\"unconditionalAttributes\":[\"searchableTitles\"]}&amp;query='(at+Bucks)'&amp;attributeWeights={\"searchableTitles.value.en\":1}&amp;numberOfResults=20\n<\/code><\/pre>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentinstance\/program\/search?filter={\"operator\":\"and\",\"criteria\":[{\"operator\":\"exists\",\"term\":\"images\"}]}&amp;annotation={\"unconditionalAttributes\":[\"searchableTitles\"]}&amp;query=-the post&amp;attributeWeights={\"searchableTitles.value.*\":1}&amp;numberOfResults=20\n<\/code><\/pre>\n<h4>Wildcards<\/h4>\n<p>Wild card search is a pattern kind of search. * and ? wildcards represent arbitrary terms or characters, respectively.<\/p>\n<ul>\n<li>? matches exactly one non-space character<\/li>\n<li>\n<ul>\n<li>matches zero or more non-space characters<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>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.<\/p>\n<p>You can use this at the end of words as well. I\u2019m search for the word which ends with ville.<\/p>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentinstance\/program\/search?filter={\"operator\":\"and\",\"criteria\":[{\"operator\":\"exists\",\"term\":\"images\"}]}&amp;annotation={\"unconditionalAttributes\":[\"searchableTitles\"]}&amp;query=*ville&amp;attributeWeights={\"searchableTitles.value.en\":1}&amp;numberOfResults=20\n<\/code><\/pre>\n<p>? 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 \u2018fun?y\u2019 (the results will have funny or funky in the titles\u201d<\/p>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentinstance\/event\/search?filter={\"operator\":\"and\",\"criteria\":[{\"operator\":\"exists\",\"term\":\"images\"}]}&amp;annotation={\"unconditionalAttributes\":[\"searchableTitles\"]}&amp;query=fun?y&amp;attributeWeights={\"searchableTitles.value.*\":1}&amp;numberOfResults=20\n<\/code><\/pre>\n<h4>Search within specific fields<\/h4>\n<p>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)<br \/>\nThe below url is used to search exact word \u201cfriends\u201d in the searchableTitles.value.en<\/p>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentInstance\/program\/search?query=searchableTitles.value.en:two&amp;annotation={\"unconditionalAttributes\": [\"searchableTitles\"]}\n<\/code><\/pre>\n<h4>AND, OR, NOT, note that logical operators have to be in CAPITAL letters<\/h4>\n<p>This will be helpful to combine two or more about search. The operators are used to combine the above search types.<\/p>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentInstance\/program\/search?query=(searchableTitles.value.en:blue)AND(NOT(searchableTitles.type:episode))&amp;numberOfResults=5&amp;annotation={\"unconditionalAttributes\": [\"searchableTitles\"]}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":279,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-714","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/comments?post=714"}],"version-history":[{"count":1,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/714\/revisions"}],"predecessor-version":[{"id":1519,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/714\/revisions\/1519"}],"up":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/279"}],"wp:attachment":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/media?parent=714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}