Fetching the Suggest Words List
Request
| HTTP Method | GET |
| Endpoint | /api/v2/suggest-words |
By sending a request to Fess such as http://<Server Name>/api/v2/suggest-words?q=fes, you can receive a list of suggest words for the given prefix in JSON format. To use the Suggest Words API, you need to enable “Suggest by Document” or “Suggest by Search Word” in the Administration screen under System > General Settings.
For the common response envelope and error model, see API Overview.
Request Parameters
The available request parameters are as follows:
Note
In v2, field names are specified with the fn parameter (not fields as in v1). Also, labels are specified with the label parameter (different from the v1 labels parameter).
Response
On success, the following response is returned in the common envelope format.
Each element of response is as follows:
Note
In v2, suggest item fields are text and types (not labels as in v1).
Usage Examples
Request example using curl:
Error Response
When the Suggest API fails, a common error envelope is returned. For details on the error model, see API Overview.