Overview
SearchList API is an API for searching and managing documents in the Fess index. It can search, retrieve, create, update, and delete documents.
Base URL
Endpoint List
| Method | Path | Description |
|---|---|---|
| GET / PUT | /docs | Search documents |
| GET | /doc/{id} | Get document |
| POST | /doc | Create document |
| PUT | /doc | Update document |
| DELETE | /doc/{id} | Delete document (by ID) |
| DELETE | /query | Delete documents (by query) |
Search Documents
Search for documents matching the search conditions.
Request
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | String | No | Search query. If not specified, all documents are targeted. |
sort | String | No | Sort field and direction |
start | Integer | No | Start position of the search results |
offset | Integer | No | Paging offset |
num | Integer | No | Number of items to retrieve |
size | Integer | No | Number of items to retrieve (alias for num) |
lang | String[] | No | Language |
Response
Response Fields
| Field | Description |
|---|---|
queryId | Search query ID |
docs | Array of search result documents |
execTime | Search execution time |
pageSize | Number of items per page |
pageNumber | Current page number |
recordCount | Number of matching items |
recordCountRelation | Relation of the matching count (exact match or lower bound) |
pageCount | Total number of pages |
Get Document
Retrieve a single document by specifying the document ID.
Request
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Document ID (doc_id, path parameter) |
Response
Create Document
Create a new document in the index.
Request
Request Body
Field Description
| Field | Required | Description |
|---|---|---|
doc | Yes | The document to register. Specified as a map of field names and values. |
Response
Update Document
Update an existing document.
Request
Request Body
Field Description
| Field | Required | Description |
|---|---|---|
doc | Yes | The document to update. Specified as a map of field names and values. |
Response
Delete Document (by ID)
Delete a document by specifying the document ID.
Request
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Document ID (doc_id, path parameter) |
Response
Delete Documents (by query)
Bulk delete documents matching a search query.
Request
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | String | Yes | Search query for the documents to delete |
Response
Returns the number of deleted documents in count.
Usage Examples
Search Documents
Get Document
Delete Documents by Query
Reference
Admin API Overview - Admin API Overview
Documents API - Bulk Document Registration API
CrawlingInfo API - Crawling Info API
Search - Search List Management Guide