v1

latestOpenAPI 3.0.02026-07-22122745.8 KB
Search

Suggestions

Search through indexed suggestions of a search engine.

get/6/{hashid}/_suggest

Path parameters

hashidstring required

Unique id of a search engine.

Query parameters

indicesstring[]

Your search engine is composed by one or many Indices. With the indices parameter you can specify to search within one specific Index. If this parameter is not provided, the search will work with all Indices.

For instance, if you want to search within the "product" Index you should use the following query:

indices[]=product

In case you want to search within multiple Indices, the query will be:

indices[]=product&indices[]=page

The order of the values do not affect the results order.

Note that [ and ] characters should be escaped (%5B and %5D) in all cases.

querystring

The search term. It must be escaped and it cannot be longer than 200 characters or 10 words.

session_idstring

Identifier of search session

The current session ID, must be unique for each user.

user_idstring

Identifier of user

Identifies the user, must be unique for each user.

statsboolean

Enable/Disable this search in stats reports. Default: true

Response

OK

string[] required

Response returned on suggestions search.

Example response

[
  "Sugg",
  "Suggest",
  "Suggestion"
]