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 Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonObject
Explain score computation of this query for the document with the given id.com.google.gson.JsonObject
Explain score computation of this query for the document with the given id in the given mapped type.Methods inherited from interface org.hibernate.search.engine.search.query.ExtendedSearchFetchable
fetch, fetch, fetchAll, scroll
Methods inherited from interface org.hibernate.search.engine.search.query.SearchFetchable
fetchAllHits, fetchHits, fetchHits, fetchSingleHit, fetchTotalHitCount
Methods inherited from interface org.hibernate.search.engine.search.query.SearchQuery
extension, queryString
-
Method Details
-
explain
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
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.
-