Interface ElasticsearchSearchQuery<H>

All Superinterfaces:
ElasticsearchSearchFetchable<H>, ExtendedSearchFetchable<H,ElasticsearchSearchResult<H>,ElasticsearchSearchScroll<H>>, ExtendedSearchQuery<H,ElasticsearchSearchResult<H>,ElasticsearchSearchScroll<H>>, SearchFetchable<H>, SearchQuery<H>

public interface ElasticsearchSearchQuery<H> extends ExtendedSearchQuery<H,ElasticsearchSearchResult<H>,ElasticsearchSearchScroll<H>>, ElasticsearchSearchFetchable<H>
  • Method Details

    • explain

      com.google.gson.JsonObject explain(Object id)
      Explain score computation of this query for the document with the given id.

      This is a shorthand for explain(String, Object) when the query only targets one index.

      Parameters:
      id - The id of the entity whose score should be explained. This is the entity ID, which may be of any type (long, ...), not the document ID which is always a string.
      Returns:
      A JsonObject describing the score computation for the hit.
      Throws:
      SearchException - If the query targets multiple indexes, or if the explain request fails.
    • explain

      com.google.gson.JsonObject explain(String typeName, Object id)
      Explain score computation of this query for the document with the given id in the given mapped type.

      This feature is relatively expensive, use it only sparingly and when you need to debug a slow query.

      Parameters:
      typeName - The name of the type of the entity whose score should be explained.
      id - The id of the entity whose score should be explained. This is the entity ID, which may be of any type (long, ...), not the document ID which is always a string.
      Returns:
      A JsonObject describing the score computation for the hit.
      Throws:
      SearchException - If the given mapped type name does not refer to a mapped name targeted by this query, or if the explain request fails.