org.hibernate.search.query.engine.impl
Class QueryHits
java.lang.Object
org.hibernate.search.query.engine.impl.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, Sanne Grinovero (C) 2011 Red Hat Inc.
Constructor Summary |
QueryHits(IndexSearcherWithPayload searcher,
org.apache.lucene.search.Query preparedQuery,
org.apache.lucene.search.Filter filter,
org.apache.lucene.search.Sort sort,
Integer n,
TimeoutManagerImpl timeoutManager,
Map<String,FacetingRequestImpl> facetRequests,
boolean enableFieldCacheOnTypes,
FieldCacheCollectorFactory idFieldCollector,
TimeoutExceptionFactory timeoutExceptionFactory)
|
QueryHits(IndexSearcherWithPayload searcher,
org.apache.lucene.search.Query preparedQuery,
org.apache.lucene.search.Filter filter,
org.apache.lucene.search.Sort sort,
TimeoutManagerImpl timeoutManager,
Map<String,FacetingRequestImpl> facetRequests,
boolean enableFieldCacheOnTypes,
FieldCacheCollectorFactory idFieldCollector,
TimeoutExceptionFactory timeoutExceptionFactory)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryHits
public QueryHits(IndexSearcherWithPayload searcher,
org.apache.lucene.search.Query preparedQuery,
org.apache.lucene.search.Filter filter,
org.apache.lucene.search.Sort sort,
TimeoutManagerImpl timeoutManager,
Map<String,FacetingRequestImpl> facetRequests,
boolean enableFieldCacheOnTypes,
FieldCacheCollectorFactory idFieldCollector,
TimeoutExceptionFactory timeoutExceptionFactory)
throws IOException
- Throws:
IOException
QueryHits
public QueryHits(IndexSearcherWithPayload searcher,
org.apache.lucene.search.Query preparedQuery,
org.apache.lucene.search.Filter filter,
org.apache.lucene.search.Sort sort,
Integer n,
TimeoutManagerImpl timeoutManager,
Map<String,FacetingRequestImpl> facetRequests,
boolean enableFieldCacheOnTypes,
FieldCacheCollectorFactory idFieldCollector,
TimeoutExceptionFactory timeoutExceptionFactory)
throws IOException
- Throws:
IOException
doc
public org.apache.lucene.document.Document doc(int index)
throws IOException
- Throws:
IOException
doc
public org.apache.lucene.document.Document doc(int index,
org.apache.lucene.document.FieldSelector selector)
throws IOException
- Throws:
IOException
scoreDoc
public org.apache.lucene.search.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 org.apache.lucene.search.Explanation explain(int index)
throws IOException
- Throws:
IOException
getTotalHits
public int getTotalHits()
getTopDocs
public org.apache.lucene.search.TopDocs getTopDocs()
getFacets
public Map<String,List<Facet>> getFacets()
getClassTypeCollector
public FieldCacheCollector getClassTypeCollector()
getIdsCollector
public FieldCacheCollector getIdsCollector()
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved