Search code examples
searchluceneepiserver

How can we directly query the Lucene service for EPiServer via a QueryString?


Are using the default Lucene search engine in EPiServer 8.0. A colleague mentioned that it's possible to directly query the search index for a published site via an entry in the QueryString. But he couldn't recall the URL format.

We are familiar with the indexing service endpoint URL, and with the Index Site Content interface URL, which look something like this:

  • mysite/indexingservice/indexingservice.svc
  • mysite/EPiServer/CMS/Admin/IndexContent.aspx

What is the URL to execute a search against the index via a QueryString? Thank you.


Solution

  • The GET api is available at /EPiServer/shell/Stores/searchresults/

    http://yoursite/EPiServer/shell/Stores/searchresults/?searchQuery=YOURQUERY&parameters=%7B"filterOnDeleted"%3Atrue%7D&filterOnCulture=false&searchRoots=1&providerId=EPiServer_Find_Cms_SearchProviders_EnterprisePageSearchProvider&dojo.preventCache=RANDOMKEY

    There are several important parameters here but most noteworthy are surly searchQuery.

    There is also an optional POST api available at /EPiServer/shell/Search/Search using the parameters epiSearchQuery, parameters and id

    None of these api's is however not available unless you are logged in to Episerver.