You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have one use case where we have to check and need to do some handling on the basis of total shards and successful shards. So it will be good if we can expose them from org.springframework.data.elasticsearch.core.SearchHits
`/*
public interface SearchHits extends Streamable<SearchHit> {
/**
* @return the aggregations.
*/
@Nullable
AggregationsContainer<?> getAggregations();
/**
* @return the maximum score
*/
float getMaxScore();
/**
* @param index position in List.
* @return the {@link SearchHit} at position {index}
* @throws IndexOutOfBoundsException on invalid index
*/
SearchHit<T> getSearchHit(int index);
/**
* @return the contained {@link SearchHit}s.
*/
List<SearchHit<T>> getSearchHits();
/**
* @return the number of total hits.
*/
long getTotalHits();
/**
* @return the relation for the total hits
*/
TotalHitsRelation getTotalHitsRelation();
/**
* @return true if aggregations are available
*/
default boolean hasAggregations() {
return getAggregations() != null;
}
/**
* @return whether the {@link SearchHits} has search hits.
*/
default boolean hasSearchHits() {
return !getSearchHits().isEmpty();
}
/**
* @return the suggest response
* @since 4.3
*/
@Nullable
Suggest getSuggest();
/**
* @return wether the {@link SearchHits} has a suggest response.
* @since 4.3
*/
default boolean hasSuggest() {
return getSuggest() != null;
}
/**
* @return an iterator for {@link SearchHit}
*/
default Iterator<SearchHit<T>> iterator() {
return getSearchHits().iterator();
}
}
`
The text was updated successfully, but these errors were encountered:
Probably might make sense to map the whole ShardStatistics property of the co.elastic.clients.elasticsearch.core.search.ResponseBody and map this into an object of its own.
Hi Team,
We have one use case where we have to check and need to do some handling on the basis of total shards and successful shards. So it will be good if we can expose them from org.springframework.data.elasticsearch.core.SearchHits
`/*
public interface SearchHits extends Streamable<SearchHit> {
}
`
The text was updated successfully, but these errors were encountered: