Class OpenSearchSearchClient

java.lang.Object
org.nuxeo.ecm.core.search.AbstractSearchClient
org.nuxeo.ecm.core.search.client.opensearch1.OpenSearchSearchClient
All Implemented Interfaces:
AutoCloseable, SearchClient

public class OpenSearchSearchClient extends AbstractSearchClient
Since:
2025.0
  • Field Details

  • Constructor Details

  • Method Details

    • isReady

      public boolean isReady()
      Description copied from interface: SearchClient
      Is the client ready and the search engine healthy to serve requests.
    • hasCapability

      public boolean hasCapability(SearchClient.Capability capability)
      Description copied from interface: SearchClient
      Checks whether the client has the capability.
    • dropIndex

      public void dropIndex(String name)
      Description copied from interface: SearchClient
      Drops an index.
    • dropAndInitIndex

      public void dropAndInitIndex(String indexName)
      Description copied from interface: SearchClient
      Recreate an existing index using the same settings and mapping.
    • indexDocuments

      public BulkIndexingResponse indexDocuments(BulkIndexingRequest request)
      Description copied from interface: SearchClient
      Index documents. Check the response for possible indexing failure.
    • refresh

      public void refresh(String indexName)
      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

      public String getDocument(String indexName, String documentId)
      Description copied from interface: SearchClient
      Returns a Json document representation or null if not found.
    • getDocumentVersion

      public Long getDocumentVersion(String indexName, String documentId)
      Description copied from interface: SearchClient
      Returns the version which is the timestamp when document was loaded for indexing
    • search

      public SearchResponse search(SearchQuery query)
      Description copied from interface: SearchClient
      Executes a search query.
    • searchScroll

      public SearchResponse searchScroll(SearchScrollContext scrollContext)
      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() returns 0.
      Parameters:
      scrollContext - provided by the previous SearchResponse.getScrollContext();
    • clearScroll

      public boolean clearScroll(SearchScrollContext scrollContext)
      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

      public Map<String,String> getTechnicalIndexes()
    • toString

      public String toString()
      Overrides:
      toString in class Object