Interface SearchResponseBuilder
@ProviderType
public interface SearchResponseBuilder
Builds a search response with the results of a search. This interface's usage
is intended for the Liferay Search Framework only.
-
Method Summary
Modifier and TypeMethodDescriptionaddFederatedSearchResponse(SearchResponse searchResponse) aggregationResultsMap(Map<String, AggregationResult> aggregationResultsMap) build()Builds the search response.count(long count) federatedSearchKey(String key) groupByResponses(List<GroupByResponse> groupByResponses) Sets the list of top hits aggregations.hits(com.liferay.portal.kernel.search.Hits hits) request(SearchRequest searchRequest) requestString(String requestString) Sets the request string submitted to the search engine.responseString(String responseString) Returns the response string from the search engine.searchHits(SearchHits searchHits) searchTimeValue(SearchTimeValue searchTimeValue) statsResponseMap(Map<String, StatsResponse> statsResponseMap) Sets the map containing the metrics aggregations computed by the search engine.
-
Method Details
-
addFederatedSearchResponse
-
aggregationResultsMap
-
build
SearchResponse build()Builds the search response.- Returns:
- the search response
-
count
-
federatedSearchKey
-
groupByResponses
Sets the list of top hits aggregations.- Parameters:
groupByResponses- the list of top hits aggregations.- Returns:
- the same builder
-
hits
-
request
-
requestString
Sets the request string submitted to the search engine.- Parameters:
requestString- the request string, as returned by the search engine- Returns:
- the search response builder
-
responseString
Returns the response string from the search engine.- Parameters:
responseString- the response string formatted by the search engine- Returns:
- the search response builder
-
searchHits
-
searchTimeValue
-
statsResponseMap
Sets the map containing the metrics aggregations computed by the search engine.- Parameters:
statsResponseMap- the map containing the metrics aggregations per field- Returns:
- the search response builder
-