org.hibernate.search.query
Class QueryHits

java.lang.Object
  extended by org.hibernate.search.query.QueryHits

public class QueryHits
extends Object

A helper class which gives access to the current query and its hits. This class will dynamically reload the underlying TopDocs if required.

Author:
Hardy Ferentschik

Field Summary
 Filter filter
           
 Query preparedQuery
           
 org.hibernate.search.query.IndexSearcherWithPayload searcher
           
 Sort sort
           
 TopDocs topDocs
           
 int totalHits
           
 
Constructor Summary
QueryHits(org.hibernate.search.query.IndexSearcherWithPayload searcher, Query preparedQuery, Filter filter, Sort sort, Integer n, TimeoutManager timeoutManager)
           
QueryHits(org.hibernate.search.query.IndexSearcherWithPayload searcher, Query preparedQuery, Filter filter, Sort sort, TimeoutManager timeoutManager)
           
 
Method Summary
 Document doc(int index)
           
 Document doc(int index, FieldSelector selector)
           
 int docId(int index)
           
 Explanation explain(int index)
           
 float score(int index)
           
 ScoreDoc scoreDoc(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preparedQuery

public final Query preparedQuery

searcher

public final org.hibernate.search.query.IndexSearcherWithPayload searcher

filter

public final Filter filter

sort

public final Sort sort

totalHits

public int totalHits

topDocs

public TopDocs topDocs
Constructor Detail

QueryHits

public QueryHits(org.hibernate.search.query.IndexSearcherWithPayload searcher,
                 Query preparedQuery,
                 Filter filter,
                 Sort sort,
                 TimeoutManager timeoutManager)
          throws IOException
Throws:
IOException

QueryHits

public QueryHits(org.hibernate.search.query.IndexSearcherWithPayload searcher,
                 Query preparedQuery,
                 Filter filter,
                 Sort sort,
                 Integer n,
                 TimeoutManager timeoutManager)
          throws IOException
Throws:
IOException
Method Detail

doc

public Document doc(int index)
             throws IOException
Throws:
IOException

doc

public Document doc(int index,
                    FieldSelector selector)
             throws IOException
Throws:
IOException

scoreDoc

public ScoreDoc scoreDoc(int index)
                  throws IOException
Throws:
IOException

docId

public int docId(int index)
          throws IOException
Throws:
IOException

score

public float score(int index)
            throws IOException
Throws:
IOException

explain

public Explanation explain(int index)
                    throws IOException
Throws:
IOException


Copyright © 2006-2010 Red Hat Middleware, LLC. All Rights Reserved