Interface LuceneSearchQuery<H>

    • Method Detail

      • explain

        Explanation 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 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

        Explanation 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:
        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.