Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.search.query
Class QueryHits

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

    public class QueryHits

extends java.lang.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
`org.apache.lucene.search.Filter` | `filter`
`org.apache.lucene.search.Query` | `preparedQuery`
`org.apache.lucene.search.Searcher` | `searcher`
`org.apache.lucene.search.Sort` | `sort`
`org.apache.lucene.search.TopDocs` | `topDocs`
`int` | `totalHits`

Constructor Summary
`QueryHits(org.apache.lucene.search.Searcher searcher, org.apache.lucene.search.Query preparedQuery, org.apache.lucene.search.Filter filter, org.apache.lucene.search.Sort sort)`
`QueryHits(org.apache.lucene.search.Searcher searcher, org.apache.lucene.search.Query preparedQuery, org.apache.lucene.search.Filter filter, org.apache.lucene.search.Sort sort, java.lang.Integer n)`

Method Summary
`org.apache.lucene.document.Document` | `doc(int index)`
`org.apache.lucene.document.Document` | `doc(int index, org.apache.lucene.document.FieldSelector selector)`
`int` | `docId(int index)`
`org.apache.lucene.search.Explanation` | `explain(int index)`
`float` | `score(int index)`
`org.apache.lucene.search.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 org.apache.lucene.search.Query preparedQuery

### searcher

    public final org.apache.lucene.search.Searcher searcher

### filter

    public final org.apache.lucene.search.Filter filter

### sort

    public final org.apache.lucene.search.Sort sort

### totalHits

    public final int totalHits

### topDocs

    public org.apache.lucene.search.TopDocs topDocs

Constructor Detail

### QueryHits

    public QueryHits(org.apache.lucene.search.Searcher searcher,
                     org.apache.lucene.search.Query preparedQuery,
                     org.apache.lucene.search.Filter filter,
                     org.apache.lucene.search.Sort sort)
              throws java.io.IOException

Throws:
  `java.io.IOException`

### QueryHits

    public QueryHits(org.apache.lucene.search.Searcher searcher,
                     org.apache.lucene.search.Query preparedQuery,
                     org.apache.lucene.search.Filter filter,
                     org.apache.lucene.search.Sort sort,
                     java.lang.Integer n)
              throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### doc

    public org.apache.lucene.document.Document doc(int index)
                                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### doc

    public org.apache.lucene.document.Document doc(int index,
                                                   org.apache.lucene.document.FieldSelector selector)
                                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### scoreDoc

    public org.apache.lucene.search.ScoreDoc scoreDoc(int index)
                                               throws java.io.IOException

  Throws:
    `java.io.IOException`

### docId

    public int docId(int index)
              throws java.io.IOException

  Throws:
    `java.io.IOException`

### score

    public float score(int index)
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### explain

    public org.apache.lucene.search.Explanation explain(int index)
                                                 throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 Hibernate. All Rights Reserved.