Elasticsearch Content Search

Search content using Elasticsearch query (POST)

Executes an Elasticsearch query against dotCMS content in a portlet context. The request body accepts an Elasticsearch JSON query. Results include matching contentlets and the raw Elasticsearch response metadata.

post/api/es/search

Query parameters

depthstring

Depth of related content to include: 0=identifiers only, 1=related contentlets, 2=related contentlets with their related identifiers, 3=related contentlets with their related contentlets. Omit to exclude relationships.

liveboolean

If true, search only live content; if false, search working content

useridstring

Admin-only: run the query under the permission context of this user ID or email address

allCategoriesInfoboolean

If true, return full category details (key, name, description); if false, return only category names

Request body

string required

Response

Elasticsearch search results returned successfully

object required

Elasticsearch search results containing contentlets matching the query and raw ES response metadata

Changes