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, userFilter
DOCUMENT, DOCUMENT_ID, EXPLANATION, ID, OBJECT_CLASS, SCORE, SPATIAL_DISTANCE, THIS
Constructor and Description |
---|
LuceneHSQuery(ExtendedSearchIntegrator extendedIntegrator) |
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).
|
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 List<IndexManager> |
getIndexManagers(EntityIndexBinding binding) |
Query |
getLuceneQuery() |
String |
getQueryString() |
protected Set<String> |
getSupportedProjectionConstants()
Returns the names of the projection constants supported by a specific implementation in addition to projecting
actual field values.
|
HSQuery |
luceneQuery(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
EntityInfo s populated with
metadata and projection. |
int |
queryResultSize() |
afterDeserialise, createFilterInstance, disableFullTextFilter, enableFullTextFilter, filter, firstResult, getCustomTypeMetadata, getExtendedSearchIntegrator, getIndexedTargetedEntities, getProjectedFields, getTargetedEntities, getTimeoutManager, hasThisProjection, isPreQueryFilterOnly, maxResults, projection, setSpatialParameters, sort, targetedEntities, targetedTypes, tenantIdentifier, timeoutExceptionFactory, validateSortFields
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterDeserialise, disableFullTextFilter, enableFullTextFilter, filter, firstResult, getExtendedSearchIntegrator, getIndexedTargetedEntities, getProjectedFields, getTargetedEntities, getTimeoutManager, hasThisProjection, maxResults, projection, setSpatialParameters, sort, targetedEntities, targetedTypes, tenantIdentifier, timeoutExceptionFactory
public LuceneHSQuery(ExtendedSearchIntegrator extendedIntegrator)
public HSQuery luceneQuery(Query query)
HSQuery
luceneQuery
in interface HSQuery
query
- the Lucene querythis
to allow method chainingprotected TimeoutManagerImpl buildTimeoutManager()
buildTimeoutManager
in class AbstractHSQuery
public FacetManagerImpl getFacetManager()
getFacetManager
in interface HSQuery
public Query getLuceneQuery()
getLuceneQuery
in interface HSQuery
public List<EntityInfo> queryEntityInfos()
HSQuery
EntityInfo
s populated with
metadata and projection. ProjectionConstants.THIS
if projected is not populated.
It is the responsibility of the object source integration.queryEntityInfos
in interface HSQuery
EntityInfo
s populated with metadata and projectionpublic DocumentExtractor queryDocumentExtractor()
queryDocumentExtractor
in interface HSQuery
DocumentExtractor
instancepublic int queryResultSize()
queryResultSize
in interface HSQuery
Caution: 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 Explanation explain(int documentId)
HSQuery
Explanation
object describing the score computation for the matching object/document
in the current queryprotected void clearCachedResults()
clearCachedResults
in class AbstractHSQuery
protected void extractFacetResults()
extractFacetResults
in class AbstractHSQuery
protected Set<String> getSupportedProjectionConstants()
AbstractHSQuery
AbstractHSQuery.HSEARCH_PROJECTION_FIELD_PREFIX
and is not
part of the set of constants returned by an implementation, an exception will be raised.getSupportedProjectionConstants
in class AbstractHSQuery
protected List<IndexManager> getIndexManagers(EntityIndexBinding binding)
getIndexManagers
in class AbstractHSQuery
public String getQueryString()
getQueryString
in interface HSQuery
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved