Interface LuceneSearchQuery<H>
- All Superinterfaces:
ExtendedSearchFetchable<H,
,LuceneSearchResult<H>, LuceneSearchScroll<H>> ExtendedSearchQuery<H,
,LuceneSearchResult<H>, LuceneSearchScroll<H>> LuceneSearchFetchable<H>
,SearchFetchable<H>
,SearchQuery<H>
public interface LuceneSearchQuery<H>
extends ExtendedSearchQuery<H,LuceneSearchResult<H>,LuceneSearchScroll<H>>, LuceneSearchFetchable<H>
-
Method Summary
Modifier and TypeMethodDescriptionExplain score computation of this query for the document with the given id.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 mapped type.- 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:
- An
Explanation
describing the score computation for the hit. - Throws:
SearchException
- If the query targets multiple mapped types, 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:
- An
Explanation
describing the score computation for the hit. - Throws:
SearchException
- If the given index name does not refer to a mapped name targeted by this query, or if the explain request fails.
-
luceneSort
Sort luceneSort()- Returns:
- The Lucene
Sort
this query relies on.
-