public class LuceneHSQuery extends AbstractHSQuery implements HSQuery
extendedIntegrator, filterDefinitions, firstResult, hasThisProjection, HSEARCH_PROJECTION_FIELD_PREFIX, indexedTargetedEntities, maxResults, projectedFields, sort, spatialFieldName, spatialSearchCenter, targetedEntities, tenantId, timeoutExceptionFactory, timeoutManager, userFilterDOCUMENT, DOCUMENT_ID, EXPLANATION, ID, OBJECT_CLASS, SCORE, SPATIAL_DISTANCE, THIS| Constructor and Description |
|---|
LuceneHSQuery(org.apache.lucene.search.Query luceneQuery,
ExtendedSearchIntegrator extendedIntegrator,
IndexedTypeMap<CustomTypeMetadata> types) |
LuceneHSQuery(org.apache.lucene.search.Query luceneQuery,
ExtendedSearchIntegrator extendedIntegrator,
IndexedTypeSet types) |
| Modifier and Type | Method and Description |
|---|---|
protected TimeoutManagerImpl |
buildTimeoutManager() |
protected void |
clearCachedResults()
This class caches some of the query results and we need to reset the state in case something in the query
changes (eg a new filter is set).
|
org.apache.lucene.search.Explanation |
explain(int documentId)
Return the Lucene
Explanation
object describing the score computation for the matching object/document
in the current query |
protected void |
extractFacetResults() |
FacetManagerImpl |
getFacetManager() |
protected Set<IndexManager> |
getIndexManagers(EntityIndexBinding binding) |
org.apache.lucene.search.Query |
getLuceneQuery() |
String |
getQueryString() |
protected Set<String> |
getSupportedProjectionConstants() |
HSQuery |
luceneQuery(org.apache.lucene.search.Query query)
Defines the underlying Lucene query
|
DocumentExtractor |
queryDocumentExtractor()
DocumentExtractor returns a traverser over the full-text results (EntityInfo)
This operation is lazy bound:
- the query is executed
- results are not retrieved until actually requested
DocumentExtractor objects *must* be closed when the results are no longer traversed.
|
List<EntityInfo> |
queryEntityInfos()
Execute the Lucene query and return the list of
EntityInfos populated with
metadata and projection. |
int |
queryResultSize() |
afterDeserialise, buildFacetingRequestsAndMetadata, buildTargetedEntityIndexBindingsByName, createFilterInstance, disableFullTextFilter, enableFullTextFilter, filter, firstResult, getCustomTypeMetadata, getExtendedSearchIntegrator, getIndexedTargetedEntities, getProjectedFields, getTargetedEntities, getTimeoutManager, hasThisProjection, isPreQueryFilterOnly, maxResults, projection, setSpatialParameters, sort, tenantIdentifier, timeoutExceptionFactory, validateSortFieldsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterDeserialise, disableFullTextFilter, enableFullTextFilter, filter, firstResult, getExtendedSearchIntegrator, getIndexedTargetedEntities, getProjectedFields, getTargetedEntities, getTimeoutManager, hasThisProjection, maxResults, projection, setSpatialParameters, sort, tenantIdentifier, timeoutExceptionFactorypublic LuceneHSQuery(org.apache.lucene.search.Query luceneQuery,
ExtendedSearchIntegrator extendedIntegrator,
IndexedTypeSet types)
public LuceneHSQuery(org.apache.lucene.search.Query luceneQuery,
ExtendedSearchIntegrator extendedIntegrator,
IndexedTypeMap<CustomTypeMetadata> types)
public HSQuery luceneQuery(org.apache.lucene.search.Query query)
HSQueryluceneQuery in interface HSQueryquery - the Lucene querythis to allow method chainingprotected TimeoutManagerImpl buildTimeoutManager()
buildTimeoutManager in class AbstractHSQuerypublic FacetManagerImpl getFacetManager()
getFacetManager in interface HSQuerypublic org.apache.lucene.search.Query getLuceneQuery()
getLuceneQuery in interface HSQuerypublic List<EntityInfo> queryEntityInfos()
HSQueryEntityInfos populated with
metadata and projection. ProjectionConstants.THIS if projected is not populated.
It is the responsibility of the object source integration.queryEntityInfos in interface HSQueryEntityInfos populated with metadata and projectionpublic DocumentExtractor queryDocumentExtractor()
queryDocumentExtractor in interface HSQueryDocumentExtractor instancepublic int queryResultSize()
queryResultSize in interface HSQueryCaution: The number of results might be slightly different from what the object source returns if the index is not in sync with the store at the time of query.
public org.apache.lucene.search.Explanation explain(int documentId)
HSQueryExplanation
object describing the score computation for the matching object/document
in the current queryprotected void clearCachedResults()
clearCachedResults in class AbstractHSQueryprotected void extractFacetResults()
extractFacetResults in class AbstractHSQueryprotected Set<String> getSupportedProjectionConstants()
getSupportedProjectionConstants in class AbstractHSQueryAbstractHSQuery.HSEARCH_PROJECTION_FIELD_PREFIX and is not
part of the set of constants returned by an implementation, an exception will be raised.protected Set<IndexManager> getIndexManagers(EntityIndexBinding binding)
getIndexManagers in class AbstractHSQuerypublic String getQueryString()
getQueryString in interface HSQueryCopyright © 2006–2017 Hibernate. All rights reserved.