Class SearchRequestBuilderService

java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.query.SearchRequestBuilderService

public class SearchRequestBuilderService extends Object
  • Field Details

    • TRACK_TOTAL_HITS_ACCURATE

      public static final int TRACK_TOTAL_HITS_ACCURATE
      See Also:
    • DEFAULT_TRACK_TOTAL_HITS_UP_TO

      public static final int DEFAULT_TRACK_TOTAL_HITS_UP_TO
      See Also:
  • Constructor Details

  • Method Details

    • buildSearchRequest

      public org.opensearch.client.opensearch.core.SearchRequest buildSearchRequest(SearchParameters searchParameters, org.opensearch.client.opensearch._types.query_dsl.Query queryWithPermissions, int from, int size, String indexName)
      Build a standard (non-scroll) search request.
      Parameters:
      searchParameters - Alfresco search configuration.
      queryWithPermissions - Query including permissions.
      from - Result offset.
      size - Number of results to return.
      indexName - Target index name.
    • buildSearchRequest

      public org.opensearch.client.opensearch.core.SearchRequest buildSearchRequest(SearchParameters searchParameters, org.opensearch.client.opensearch._types.query_dsl.Query queryWithPermissions, int size, org.opensearch.client.opensearch._types.Time scrollTime, String indexName)
      Build a scroll search request.
      Parameters:
      searchParameters - Alfresco search configuration.
      queryWithPermissions - Query including permissions.
      size - Batch size per scroll page.
      scrollTime - Scroll context duration.
      indexName - Target index name.
    • getElasticIndex

      public String getElasticIndex(List<StoreRef> stores)
      Translates the Alfresco Store name to an Elasticsearch Index name
      Parameters:
      stores - List of Alfresco Store names, it must contain only one element
      Returns:
      String with the name of the Elasticsearch Index name corresponding to the Alfresco Store name