Package org.elasticsearch.search
Enum Class SearchResponseUtils
- All Implemented Interfaces:
Serializable,Comparable<SearchResponseUtils>,Constable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ObjectParser.UnknownFieldConsumer<Map<String, Object>> -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeclareInnerHitsParseFields(ObjectParser<Map<String, Object>, Void> parser) static SearchResponseemptyWithTotalHits(String scrollId, int totalShards, int successfulShards, int skippedShards, long tookInMillis, ShardSearchFailure[] shardFailures, SearchResponse.Clusters clusters) static org.apache.lucene.search.TotalHitsgetTotalHits(SearchRequestBuilder request) static longgetTotalHitsValue(SearchRequestBuilder request) static CollectorResultparseCollectorResult(XContentParser parser) static HighlightFieldparseHighlightField(XContentParser parser) static SearchResponsestatic MultiSearchResponsestatic SearchHit.NestedIdentityparseNestedIdentity(XContentParser parser) static SearchProfileDfsPhaseResultstatic ProfileResultstatic QueryProfileShardResultstatic SearchHitparseSearchHit(XContentParser parser) Parses a single search hit from XContent into a ref-countedSearchHit.static SearchHitsparseSearchHits(XContentParser parser) Parses search hits from XContent into a ref-countedSearchHits.static SearchProfileResultsstatic SearchResponseparseSearchResponse(XContentParser parser) static SearchSortValuesparseSearchSortValues(XContentParser parser) static ShardSearchFailurestatic SuggestparseSuggest(XContentParser parser) this parsing method assumes that the leading "suggest" field name has already been parsed by the callerstatic Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> parseSuggestion(XContentParser parser) response()response(SearchHits hits) static SearchResponseresponseAsSearchResponse(Response searchResponse) static SearchHitsearchHitFromMap(Map<String, Object> values) static SearchResponsesuccessfulResponse(SearchHits hits) static SearchResponseUtilsReturns the enum constant of this class with the specified name.static SearchResponseUtils[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Field Details
-
unknownMetaFieldConsumer
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
response
-
response
-
successfulResponse
-
emptyWithTotalHits
public static SearchResponse emptyWithTotalHits(String scrollId, int totalShards, int successfulShards, int skippedShards, long tookInMillis, ShardSearchFailure[] shardFailures, SearchResponse.Clusters clusters) -
getTotalHits
-
getTotalHitsValue
-
responseAsSearchResponse
- Throws:
IOException
-
parseSearchResponse
- Throws:
IOException
-
parseMultiSearchResponse
-
parseInnerSearchResponse
- Throws:
IOException
-
parseSearchProfileResults
public static SearchProfileResults parseSearchProfileResults(XContentParser parser) throws IOException - Throws:
IOException
-
parseProfileDfsPhaseResult
public static SearchProfileDfsPhaseResult parseProfileDfsPhaseResult(XContentParser parser) throws IOException - Throws:
IOException
-
parseQueryProfileShardResult
public static QueryProfileShardResult parseQueryProfileShardResult(XContentParser parser) throws IOException - Throws:
IOException
-
parseSearchHits
Parses search hits from XContent into a ref-countedSearchHits. Callers mustSearchHits.decRef()when done.- Throws:
IOException
-
parseSearchHit
Parses a single search hit from XContent into a ref-countedSearchHit. Callers mustSearchHit.decRef()when done. -
declareInnerHitsParseFields
-
parseSuggest
this parsing method assumes that the leading "suggest" field name has already been parsed by the caller- Throws:
IOException
-
parseSuggestion
public static Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> parseSuggestion(XContentParser parser) throws IOException - Throws:
IOException
-
parseNestedIdentity
-
searchHitFromMap
-
readAggregationProfileShardResult
public static AggregationProfileShardResult readAggregationProfileShardResult(XContentParser parser) throws IOException - Throws:
IOException
-
parseCollectorResult
- Throws:
IOException
-
parseHighlightField
- Throws:
IOException
-
parseProfileResult
- Throws:
IOException
-
parseSearchSortValues
- Throws:
IOException
-
parseShardSearchFailure
- Throws:
IOException
-