public class ElasticsearchHSQueryImpl extends AbstractHSQuery
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 |
---|
ElasticsearchHSQueryImpl(com.google.gson.JsonObject rawSearchPayload,
ExtendedSearchIntegrator extendedIntegrator) |
Modifier and Type | Method and Description |
---|---|
protected TimeoutManagerImpl |
buildTimeoutManager() |
protected void |
clearCachedResults() |
protected com.google.gson.JsonObject |
createFullTextFilter(FilterDef def,
Object filterOrFactory) |
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()
Execute the Lucene query and return a traversable object over the results.
|
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
public ElasticsearchHSQueryImpl(com.google.gson.JsonObject rawSearchPayload, ExtendedSearchIntegrator extendedIntegrator)
public HSQuery luceneQuery(Query query)
HSQuery
query
- the Lucene querythis
to allow method chainingpublic FacetManagerImpl getFacetManager()
public Query getLuceneQuery()
public String getQueryString()
public DocumentExtractor queryDocumentExtractor()
HSQuery
ProjectionConstants.THIS
if projected is not populated. It is the responsibility
of the object source integration.
The returned DocumentExtractor
must be closed by the caller to release Lucene resources.DocumentExtractor
instancepublic int queryResultSize()
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 querydocumentId
- Lucene Document id to be explain. This is NOT the object idprotected void clearCachedResults()
clearCachedResults
in class AbstractHSQuery
protected TimeoutManagerImpl buildTimeoutManager()
buildTimeoutManager
in class AbstractHSQuery
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.EntityInfo
s populated with metadata and projectionprotected 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
protected void extractFacetResults()
extractFacetResults
in class AbstractHSQuery
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved