Class SearchExecutionStrategy
java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.query.SearchExecutionStrategy
- All Implemented Interfaces:
SearchStrategy
- Direct Known Subclasses:
ScrollSearchStrategy,StandardSearchStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ResultSetexecuteSearch(SearchParameters searchParameters, org.opensearch.client.opensearch._types.query_dsl.Query queryWithPermissions) protected booleanisHighlightError(String message) Checks if the error message is related to highlight offset.protected voidvalidateResponse(org.opensearch.client.opensearch.core.SearchResponse<?> searchResponse) Validates the search response for shard failures and highlight errors.
-
Field Details
-
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:
executeSearchin interfaceSearchStrategy- 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
Checks if the error message is related to highlight offset.- Parameters:
message- Error message.- Returns:
- true if highlight error, false otherwise.
-