Class OpenSearchSearchClient
java.lang.Object
org.nuxeo.ecm.core.search.AbstractSearchClient
org.nuxeo.ecm.core.search.client.opensearch1.OpenSearchSearchClient
- All Implemented Interfaces:
AutoCloseable,SearchClient
- Since:
- 2025.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.search.SearchClient
SearchClient.Capability -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final OpenSearchClientstatic final Stringprotected final OpenSearchQueryTransformerprotected final OpenSearchResponseTransformerFields inherited from class org.nuxeo.ecm.core.search.AbstractSearchClient
nameFields inherited from interface org.nuxeo.ecm.core.search.SearchClient
DEFAULT_CLIENT_NAME_PROP -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchSearchClient(OpenSearchSearchClientDescriptor descriptor, Map<String, OpenSearchHintQueryBuilder> hints) -
Method Summary
Modifier and TypeMethodDescriptionbooleanclearScroll(SearchScrollContext scrollContext) Explicitly clear the search scroll context, without waiting for the scroll keep alive to timeout.protected voidclearScrollContext(org.opensearch.action.search.SearchResponse response) voidclose()protected voiddoRecurseDelete(String indexName, org.opensearch.index.query.QueryBuilder queryBuilder) voiddropAndInitIndex(String indexName) Recreate an existing index using the same settings and mapping.voidDrops an index.getDocument(String indexName, String documentId) Returns a Json document representation or null if not found.getDocumentVersion(String indexName, String documentId) Returns the version which is the timestamp when document was loaded for indexingbooleanhasCapability(SearchClient.Capability capability) Checks whether the client has the capability.indexDocuments(BulkIndexingRequest request) Index documents.booleanisReady()Is the client ready and the search engine healthy to serve requests.voidRefreshes an index so newly indexed documents are searchable.search(SearchQuery query) Executes a search query.searchScroll(SearchScrollContext scrollContext) Iterate on results for a scroll search.toString()Methods inherited from class org.nuxeo.ecm.core.search.AbstractSearchClient
getCapabilities, getName
-
Field Details
-
ECM_ANCESTOR_FIELDS
- See Also:
-
responseTransformer
-
client
-
indexes
-
queryTransformer
-
-
Constructor Details
-
OpenSearchSearchClient
public OpenSearchSearchClient(OpenSearchSearchClientDescriptor descriptor, Map<String, OpenSearchHintQueryBuilder> hints)
-
-
Method Details
-
isReady
public boolean isReady()Description copied from interface:SearchClientIs the client ready and the search engine healthy to serve requests. -
hasCapability
Description copied from interface:SearchClientChecks whether the client has the capability. -
dropIndex
Description copied from interface:SearchClientDrops an index. -
dropAndInitIndex
Description copied from interface:SearchClientRecreate an existing index using the same settings and mapping. -
indexDocuments
Description copied from interface:SearchClientIndex documents. Check the response for possible indexing failure. -
refresh
Description copied from interface:SearchClientRefreshes an index so newly indexed documents are searchable. -
doRecurseDelete
protected void doRecurseDelete(String indexName, org.opensearch.index.query.QueryBuilder queryBuilder) -
clearScrollContext
protected void clearScrollContext(org.opensearch.action.search.SearchResponse response) -
getDocument
Description copied from interface:SearchClientReturns a Json document representation or null if not found. -
getDocumentVersion
Description copied from interface:SearchClientReturns the version which is the timestamp when document was loaded for indexing -
search
Description copied from interface:SearchClientExecutes a search query. -
searchScroll
Description copied from interface:SearchClientIterate on results for a scroll search. The end of scroll is reached when there is no more hit, i.e.SearchResponse.getHitsCount()returns0.- Parameters:
scrollContext- provided by the previousSearchResponse.getScrollContext();
-
clearScroll
Description copied from interface:SearchClientExplicitly clear the search scroll context, without waiting for the scroll keep alive to timeout.- Returns:
trueif the context is successfully cleared.
-
close
public void close() -
getTechnicalIndexes
-
toString
-