Class ElasticsearchObject
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
-
- org.nuxeo.ecm.restapi.server.jaxrs.management.ElasticsearchObject
-
public class ElasticsearchObject extends AbstractResource<ResourceTypeImpl>
Endpoint to manage Elasticsearch.- Since:
- 11.3
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringDEFAULT_CHECK_SEARCH_NXQLprotected static LongDEFAULT_CHECK_SEARCH_PAGE_SIZEstatic StringGET_ALL_DOCUMENTS_QUERYprotected static com.fasterxml.jackson.databind.ObjectMapperMAPPER
-
Constructor Summary
Constructors Constructor Description ElasticsearchObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcheckSearch(String nxql, Long pageSize)Check discrepancies between elastic and repository search.voiddoFlush()Executes an ES flush on document index of a given repository.BulkStatusdoIndexing(String query)Performs an ES indexing on documents matching the optional NXQL query.BulkStatusdoIndexingOnDocument(String documentId)Performs an ES indexing on the given document and his children.voiddoOptimize()Executes an ES optimize on document index of a given repository.protected Map<String,Serializable>extractResultInfo(String ppName, String nxql, long pageSize)protected BulkStatusperformIndexing(String query)Performs an ES indexing on documents matching the optional NXQL query.-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, initialize, isAdapter, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
-
-
-
-
Field Detail
-
GET_ALL_DOCUMENTS_QUERY
public static final String GET_ALL_DOCUMENTS_QUERY
- See Also:
- Constant Field Values
-
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
-
DEFAULT_CHECK_SEARCH_NXQL
protected static final String DEFAULT_CHECK_SEARCH_NXQL
- See Also:
- Constant Field Values
-
DEFAULT_CHECK_SEARCH_PAGE_SIZE
protected static final Long DEFAULT_CHECK_SEARCH_PAGE_SIZE
-
-
Method Detail
-
doIndexing
public BulkStatus doIndexing(String query)
Performs an ES indexing on documents matching the optional NXQL query.- See Also:
performIndexing(String)
-
doIndexingOnDocument
public BulkStatus doIndexingOnDocument(String documentId)
Performs an ES indexing on the given document and his children.- Parameters:
documentId- the id of the document that will be indexed and his children recursively- See Also:
performIndexing(String)
-
doFlush
public void doFlush()
Executes an ES flush on document index of a given repository.
-
doOptimize
public void doOptimize()
Executes an ES optimize on document index of a given repository.
-
checkSearch
public String checkSearch(String nxql, Long pageSize)
Check discrepancies between elastic and repository search.- Since:
- 2023.7
-
extractResultInfo
protected Map<String,Serializable> extractResultInfo(String ppName, String nxql, long pageSize)
-
performIndexing
protected BulkStatus performIndexing(String query)
Performs an ES indexing on documents matching the optional NXQL query.- Parameters:
query- the NXQL query that documents must match to be indexed, can benullorempty, in this case all documents of the given repository will be indexedGET_ALL_DOCUMENTS_QUERY- Returns:
- the
BulkStatusof the ES indexing
-
-