Class SearchExecutionStrategy

java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.query.SearchExecutionStrategy
All Implemented Interfaces:
SearchStrategy
Direct Known Subclasses:
ScrollSearchStrategy, StandardSearchStrategy

public abstract class SearchExecutionStrategy extends Object implements SearchStrategy
  • Field Details

    • HIGHLIGHT_ERROR_KEYWORD

      protected static final String HIGHLIGHT_ERROR_KEYWORD
      See Also:
    • LOGGER

      protected static final org.slf4j.Logger LOGGER
  • Constructor Details

    • SearchExecutionStrategy

      public SearchExecutionStrategy()
  • Method Details

    • executeSearch

      public abstract ResultSet executeSearch(SearchParameters searchParameters, org.opensearch.client.opensearch._types.query_dsl.Query queryWithPermissions) throws IOException
      Specified by:
      executeSearch in interface SearchStrategy
      Throws:
      IOException
    • validateResponse

      protected void validateResponse(org.opensearch.client.opensearch.core.SearchResponse<?> searchResponse)
      Validates the search response for shard failures and highlight errors. Throws exception if highlight error is detected.
      Parameters:
      searchResponse - The OpenSearch response.
    • isHighlightError

      protected boolean isHighlightError(String message)
      Checks if the error message is related to highlight offset.
      Parameters:
      message - Error message.
      Returns:
      true if highlight error, false otherwise.