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 OpenSearchClient
static final String
protected final OpenSearchQueryTransformer
protected final OpenSearchResponseTransformer
Fields inherited from class org.nuxeo.ecm.core.search.AbstractSearchClient
name
Fields 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 TypeMethodDescriptionboolean
clearScroll
(SearchScrollContext scrollContext) Explicitly clear the search scroll context, without waiting for the scroll keep alive to timeout.void
close()
protected void
doRecurseDelete
(String indexName, org.opensearch.index.query.QueryBuilder queryBuilder) void
dropAndInitIndex
(String indexName) Recreate an existing index using the same settings and mapping.void
Drops 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 indexingboolean
hasCapability
(SearchClient.Capability capability) Checks whether the client has the capability.indexDocuments
(BulkIndexingRequest request) Index documents.boolean
isReady()
Is the client ready and the search engine healthy to serve requests.void
Refreshes 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:SearchClient
Is the client ready and the search engine healthy to serve requests. -
hasCapability
Description copied from interface:SearchClient
Checks whether the client has the capability. -
dropIndex
Description copied from interface:SearchClient
Drops an index. -
dropAndInitIndex
Description copied from interface:SearchClient
Recreate an existing index using the same settings and mapping. -
indexDocuments
Description copied from interface:SearchClient
Index documents. Check the response for possible indexing failure. -
refresh
Description copied from interface:SearchClient
Refreshes an index so newly indexed documents are searchable. -
doRecurseDelete
protected void doRecurseDelete(String indexName, org.opensearch.index.query.QueryBuilder queryBuilder) -
getDocument
Description copied from interface:SearchClient
Returns a Json document representation or null if not found. -
getDocumentVersion
Description copied from interface:SearchClient
Returns the version which is the timestamp when document was loaded for indexing -
search
Description copied from interface:SearchClient
Executes a search query. -
searchScroll
Description copied from interface:SearchClient
Iterate 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:SearchClient
Explicitly clear the search scroll context, without waiting for the scroll keep alive to timeout.- Returns:
true
if the context is successfully cleared.
-
close
public void close() -
getTechnicalIndexes
-
toString
-