Auto-Suggest API


This page describes how to use SearchStax® Site Search “Auto Suggest API”.

The Autosuggest Endpoint for your App is available within your Apps Management page as shown below:

This is the Site Search-Search API tab under Apps Management and shows how to get the Suggest URL API.

As your users enter characters, you can call this endpoint to get suggestions for search queries.

Example: As a user starts typing si, you can call:

https://ss849763-cvrfzabx-us-east-1-aws.searchstax.com/solr/ss849763-CORPSITE-suggester-1/emsuggest?q=si

to get all suggestions for “si” as shown below:

{
  "responseHeader": {
    "zkConnected": true,
    "status": 0,
    "QTime": 0,
    "params": {
      "q": "si",
      "suggest.minPrefixChars": "2",
      "echoParams": "all",
      "suggest.count": "6",
      "suggest": "true",
      "suggest.dictionary": "suggester1",
      "wt": "json"
    }
  },
  "suggest": {
    "suggester1": {
      "si": {
        "numFound": 2,
        "suggestions": [
          {
            "term": "<b>si</b>tecore",
            "weight": 100,
            "payload": ""
          },
          {
            "term": "<b>si</b>te search",
            "weight": 100,
            "payload": ""
          }
        ]
      }
    }
  }
}

You can see all suggestions, along with their weights under suggest.<suggestername>.<enteredCharacters>