Overview
The Suggest API is an API for managing suggest words used by the suggest feature of Fess. You can retrieve statistical information about the number of suggest words and delete suggest words.
Suggest words include those generated from crawled documents (document-derived) and those generated from user search queries (search-query-derived). This API allows you to delete them by type or delete all of them at once.
Authentication
Access to this API requires authentication using an access token. Specify the access token in the request header.
The access token must be granted the Admin API permission (Radmin-api by default). For details on how to obtain an access token and about permissions, see Admin API Overview.
Base URL
Endpoint List
| Method | Path | Description |
|---|---|---|
| GET | / | Retrieve suggest word statistics |
| DELETE | /all | Delete all suggest words |
| DELETE | /document | Delete document-derived suggest words |
| DELETE | /query | Delete search-query-derived suggest words |
Retrieve Suggest Word Statistics
Retrieves statistical information about the number of suggest words.
Request
Response
Response Fields
| Field | Description |
|---|---|
setting.totalWordsNum | Total number of suggest words (the number of suggest words registered in the suggest index) |
setting.documentWordsNum | Number of document-derived suggest words (the number of suggest words with a document frequency of 1 or more) |
setting.queryWordsNum | Number of search-query-derived suggest words (the number of suggest words with a query frequency of 1 or more) |
Note
documentWordsNum and queryWordsNum are not mutually exclusive. If a single suggest word is derived from both a document and a search query, it is included in both counts. Therefore, the sum of documentWordsNum and queryWordsNum may not equal totalWordsNum.
Delete All Suggest Words
Deletes all suggest words. All suggest words in the suggest index are targeted, regardless of whether they are document-derived or search-query-derived.
Request
Response
Delete Document-Derived Suggest Words
Deletes suggest words generated from documents (document-derived suggest words).
Request
Response
Delete Search-Query-Derived Suggest Words
Deletes suggest words generated from search queries (search-query-derived suggest words).
Request
Response
Error Response
If a delete operation fails, HTTP status 400 is returned, the status field in the response body is set to 1 (BAD_REQUEST), and message contains an error message.
If the access token is missing or invalid, or if permissions are insufficient, the status field in the response body is set to 3 (UNAUTHORIZED). For a list of status values and HTTP status codes, see Admin API Overview.
Usage Examples
Retrieve Statistics
Delete All Suggest Words
Delete Document-Derived Suggest Words
Delete Search-Query-Derived Suggest Words
Reference
Admin API Overview - Admin API Overview
BadWord API - Bad Word API
ElevateWord API - Elevate Word API
Suggest Word - Suggest Management Guide