org.hibernate.search.query.engine.impl
Class DocumentExtractorImpl
java.lang.Object
org.hibernate.search.query.engine.impl.DocumentExtractorImpl
- All Implemented Interfaces:
- DocumentExtractor
public class DocumentExtractorImpl
- extends Object
- implements DocumentExtractor
DocumentExtractor is a traverser over the full-text results (EntityInfo)
This operation is as lazy as possible:
- the query is executed eagerly
- results are not retrieved until actually requested
#getFirstIndex and #getMaxIndex define the boundaries available to #extract.
DocumentExtractor objects *must* be closed when the results are no longer traversed.
#close
- Author:
- Emmanuel Bernard, John Griffin, Hardy Ferentschik, Sanne Grinovero (C) 2011 Red Hat Inc.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentExtractorImpl
public DocumentExtractorImpl(QueryHits queryHits,
SearchFactoryImplementor searchFactoryImplementor,
String[] projection,
Set<String> idFieldNames,
boolean allowFieldSelection,
IndexSearcherWithPayload searcher,
Object query,
int firstIndex,
int maxIndex,
Set<Class<?>> classesAndSubclasses)
extract
public EntityInfo extract(int scoreDocIndex)
throws IOException
- Specified by:
extract
in interface DocumentExtractor
- Throws:
IOException
getFirstIndex
public int getFirstIndex()
- Specified by:
getFirstIndex
in interface DocumentExtractor
getMaxIndex
public int getMaxIndex()
- Specified by:
getMaxIndex
in interface DocumentExtractor
close
public void close()
- Specified by:
close
in interface DocumentExtractor
getTopDocs
public org.apache.lucene.search.TopDocs getTopDocs()
- Specified by:
getTopDocs
in interface DocumentExtractor
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved