T
- public class DocumentQuery<T> extends AbstractDocumentQuery<T,DocumentQuery<T>> implements IDocumentQuery<T>
afterQueryExecutedCallback, afterStreamExecutedCallback, allowMultipleIndexEntriesForSameDocumentToResultTransformer, beforeQueryExecutionAction, clazz, cutoff, cutoffEtag, defaultField, defaultOperator, disableCaching, disableEntitiesTracking, distanceErrorPct, distinct, fieldsToFetch, groupByFields, highlightedFields, highlighterKeyName, highlighterPostTags, highlighterPreTags, highlightings, includes, indexName, isMapReduce, isSpatialQuery, lastEquality, negate, orderByFields, pageSize, projectionFields, queryListeners, queryOperation, queryShape, queryStats, queryText, resultsTransformer, rootTypes, shouldExplainScores, showQueryTimings, sortByHints, spatialFieldName, spatialRelation, spatialUnits, start, theDatabaseCommands, theSession, theWaitForNonStaleResults, theWaitForNonStaleResultsAsOfNow, timeout, transformerParameters, transformResultsFunc
Constructor and Description |
---|
DocumentQuery(Class<T> clazz,
InMemoryDocumentSessionOperations session,
IDatabaseCommands databaseCommands,
String indexName,
String[] fieldsToFetch,
String[] projectionFields,
List<IDocumentQueryListener> queryListeners,
boolean isMapReduce)
Initializes a new instance of the
DocumentQuery class. |
DocumentQuery(DocumentQuery<T> other)
Initializes a new instance of the
DocumentQuery class. |
Modifier and Type | Method and Description |
---|---|
<TValue> IDocumentQuery<T> |
addOrder(com.mysema.query.types.Expression<?> propertySelector,
boolean descending)
Adds an ordering for a specific field to the query
|
boolean |
any()
Returns if any entry matches query
|
IDocumentQuery<T> |
containsAll(com.mysema.query.types.Expression<?> propertySelector,
Collection<Object> values)
Performs a query matching ALL of the provided values against the given field (AND)
|
IDocumentQuery<T> |
containsAny(com.mysema.query.types.Expression<?> propertySelector,
Collection<Object> values)
Performs a query matching ANY of the provided values against the given field (OR)
|
IDocumentQuery<T> |
distinct()
Apply distinct operation to this query
|
IDocumentQuery<T> |
explainScores()
Adds explanations of scores calculated for queried documents to the query result
|
T |
first()
Returns first result
|
T |
firstOrDefault()
Returns first result
|
<TValue> IDocumentQuery<T> |
highlight(com.mysema.query.types.Expression<?> propertySelector,
com.mysema.query.types.Expression<?> keyPropertySelector,
int fragmentLength,
int fragmentCount,
Reference<FieldHighlightings> highlightings)
Adds matches highlighting for the specified field on a Map/Reduce Index.
|
<TValue> IDocumentQuery<T> |
highlight(com.mysema.query.types.Expression<?> propertySelector,
int fragmentLength,
int fragmentCount,
com.mysema.query.types.path.ListPath<?,?> fragmentsPropertySelector)
Adds matches highlighting for the specified field.
|
<TValue> IDocumentQuery<T> |
highlight(com.mysema.query.types.Expression<?> propertySelector,
int fragmentLength,
int fragmentCount,
Reference<FieldHighlightings> highlightings)
Adds matches highlighting for the specified field.
|
boolean |
isDistinct()
Whatever we should apply distinct operation to the query on the server side
|
IDocumentQuery<T> |
not()
Negate the next operation
|
<TValue> IDocumentQuery<T> |
orderBy(com.mysema.query.types.Expression<?>... propertySelectors)
Order the results by the specified fields
The fields are the names of the fields to sort, defaulting to sorting by ascending.
|
<TValue> IDocumentQuery<T> |
orderByDescending(com.mysema.query.types.Expression<?>... propertySelectors)
Order the results by the specified fields
The fields are the names of the fields to sort, defaulting to sorting by descending.
|
IDocumentQuery<T> |
orderByScore()
Adds an ordering by score for a specific field to the query
|
IDocumentQuery<T> |
orderByScoreDescending()
Adds an ordering by score for a specific field to the query
|
IDocumentQuery<T> |
relatesToShape(String fieldName,
String shapeWKT,
SpatialOptions.SpatialRelation rel)
Filter matches based on a given shape - only documents with the shape defined in fieldName that
have a relation rel with the given shapeWKT will be returned
|
IDocumentQuery<T> |
relatesToShape(String fieldName,
String shapeWKT,
SpatialOptions.SpatialRelation rel,
double distanceErroPct)
Filter matches based on a given shape - only documents with the shape defined in fieldName that
have a relation rel with the given shapeWKT will be returned
|
<TValue> IDocumentQuery<T> |
search(com.mysema.query.types.Expression<?> propertySelector,
String searchTerms)
Perform a search for documents which fields that match the searchTerms.
|
<TValue> IDocumentQuery<T> |
search(com.mysema.query.types.Expression<?> propertySelector,
String searchTerms,
EscapeQueryOptions escapeQueryOptions)
Perform a search for documents which fields that match the searchTerms.
|
<TProjection> |
selectFields(Class<TProjection> projectionClass)
Selects the projection fields directly from the index
|
<TProjection> |
selectFields(Class<TProjection> projectionClass,
String... fields)
Selects the specified fields directly from the index
|
<TProjection> |
selectFields(Class<TProjection> projectionClass,
String[] fields,
String[] projections)
Selects the specified fields directly from the index
|
<TTransformer extends AbstractTransformerCreationTask,TTransformerResult> |
setResultTransformer(Class<TTransformer> transformerClass,
Class<TTransformerResult> resultClass)
Sets a transformer to use after executing a query
|
IDocumentQuery<T> |
setResultTransformer(String resultsTransformer)
Sets a transformer to use after executing a query
|
IDocumentQuery<T> |
setTransformerParameters(Map<String,RavenJToken> transformerParameters)
Get the facets as per the specified facets with the given start and pageSize
|
T |
single()
Returns single result
|
T |
singleOrDefault()
Returns single result
|
IDocumentQuery<T> |
sortByDistance()
Sorts the query results by distance.
|
IDocumentQuery<T> |
sortByDistance(double lat,
double lng)
Sorts the query results by distance.
|
IDocumentQuery<T> |
sortByDistance(double lat,
double lng,
String sortedFieldName)
Sorts the query results by distance.
|
IDocumentQuery<T> |
spatial(com.mysema.query.types.Path<?> path,
SpatialCriteria criteria)
Ability to use one factory to determine spatial shape that will be used in query.
|
IDocumentQuery<T> |
spatial(String fieldName,
SpatialCriteria criteria)
Ability to use one factory to determine spatial shape that will be used in query.
|
FacetResults |
toFacets(List<Facet> facets)
Query the facets results for this query using the specified list of facets with the given start and pageSize
|
FacetResults |
toFacets(List<Facet> facets,
int start)
Query the facets results for this query using the specified list of facets with the given start and pageSize
|
FacetResults |
toFacets(List<Facet> facets,
int start,
Integer pageSize)
Query the facets results for this query using the specified list of facets with the given start and pageSize
|
FacetResults |
toFacets(String facetSetupDoc)
Query the facets results for this query using the specified facet document with the given start and pageSize
|
FacetResults |
toFacets(String facetSetupDoc,
int start)
Query the facets results for this query using the specified facet document with the given start and pageSize
|
FacetResults |
toFacets(String facetSetupDoc,
int start,
Integer pageSize)
Query the facets results for this query using the specified facet document with the given start and pageSize
|
Lazy<FacetResults> |
toFacetsLazy(List<Facet> facets)
Query the facets results for this query using the specified list of facets with the given start and pageSize
|
Lazy<FacetResults> |
toFacetsLazy(List<Facet> facets,
int start)
Query the facets results for this query using the specified list of facets with the given start and pageSize
|
Lazy<FacetResults> |
toFacetsLazy(List<Facet> facets,
int start,
Integer pageSize)
Query the facets results for this query using the specified list of facets with the given start and pageSize
|
Lazy<FacetResults> |
toFacetsLazy(String facetSetupDoc)
Query the facets results for this query using the specified facet document with the given start and pageSize
|
Lazy<FacetResults> |
toFacetsLazy(String facetSetupDoc,
int start)
Query the facets results for this query using the specified facet document with the given start and pageSize
|
Lazy<FacetResults> |
toFacetsLazy(String facetSetupDoc,
int start,
Integer pageSize)
Query the facets results for this query using the specified facet document with the given start and pageSize
|
List<T> |
toList()
Materialize query, executes request and returns with results
|
String |
toString()
Returns a
String that represents the query for this instance. |
<TValue> IDocumentQuery<T> |
whereBetween(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue start,
TValue end)
Matches fields where the value is between the specified start and end, exclusive
|
<TValue> IDocumentQuery<T> |
whereBetweenOrEqual(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue start,
TValue end)
Matches fields where the value is between the specified start and end, inclusive
|
<TValue> IDocumentQuery<T> |
whereEndsWith(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields which ends with the specified value.
|
<TValue> IDocumentQuery<T> |
whereEquals(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches exact value
Defaults to NotAnalyzed
|
<TValue> IDocumentQuery<T> |
whereEquals(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value,
boolean isAnalyzed)
Matches exact value
Defaults to allow wildcards only if analyzed
|
<TValue> IDocumentQuery<T> |
whereGreaterThan(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields where the value is greater than the specified value
|
<TValue> IDocumentQuery<T> |
whereGreaterThanOrEqual(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields where the value is greater than or equal to the specified value
|
<TValue> IDocumentQuery<T> |
whereIn(com.mysema.query.types.Expression<? super TValue> propertySelector,
Collection<TValue> values)
Check that the field has one of the specified values
|
<TValue> IDocumentQuery<T> |
whereLessThan(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields where the value is less than the specified value
|
<TValue> IDocumentQuery<T> |
whereLessThanOrEqual(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields where the value is less than or equal to the specified value
|
<TValue> IDocumentQuery<T> |
whereStartsWith(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields which starts with the specified value.
|
IDocumentQuery<T> |
withinRadiusOf(double radius,
double latitude,
double longitude)
Filter matches to be inside the specified radius
|
IDocumentQuery<T> |
withinRadiusOf(double radius,
double latitude,
double longitude,
SpatialOptions.SpatialUnits radiusUnits)
Filter matches to be inside the specified radius
|
IDocumentQuery<T> |
withinRadiusOf(String fieldName,
double radius,
double latitude,
double longitude)
Filter matches to be inside the specified radius
|
IDocumentQuery<T> |
withinRadiusOf(String fieldName,
double radius,
double latitude,
double longitude,
SpatialOptions.SpatialUnits radiusUnits)
Filter matches to be inside the specified radius
|
addOrder, addOrder, addRootType, afterQueryExecuted, afterStreamExecuted, andAlso, beforeQueryExecution, boost, clearSortHints, closeSubclause, containsAll, containsAny, countLazily, customSortUsing, customSortUsing, executeActualQuery, executeBeforeQueryListeners, fuzzy, generateIndexQuery, generateQueryWithinRadiusOf, generateQueryWithinRadiusOf, generateQueryWithinRadiusOf, generateSpatialQueryData, generateSpatialQueryData, generateSpatialQueryData, generateSpatialQueryData, generateSpatialQueryData, getDatabaseCommands, getDocumentConvention, getElementType, getFacets, getFacets, getIndexQueried, getIndexQuery, getLastEqualityTerm, getMemberQueryPath, getMemberQueryPathForOrderBy, getMemberQueryPaths, getMemberQueryPathsForOrderBy, getProjectionFields, getQueryResult, getSession, highlight, highlight, highlight, include, include, include, initializeQueryOperation, initSync, intersect, invokeAfterQueryExecuted, invokeAfterStreamExecuted, iterator, lazily, lazily, negateNext, noCaching, noTracking, openSubclause, orderBy, orderByDescending, orElse, proximity, randomOrdering, randomOrdering, search, search, setAllowMultipleIndexEntriesForSameDocumentToResultTransformer, setHighlighterTags, setHighlighterTags, setOriginalQueryType, showTimings, skip, statistics, take, transformResults, updateStatsAndHighlightings, usingDefaultField, usingDefaultOperator, waitForNonStaleResults, waitForNonStaleResults, waitForNonStaleResultsAsOf, waitForNonStaleResultsAsOf, waitForNonStaleResultsAsOf, waitForNonStaleResultsAsOf, waitForNonStaleResultsAsOfLastWrite, waitForNonStaleResultsAsOfLastWrite, waitForNonStaleResultsAsOfNow, waitForNonStaleResultsAsOfNow, where, whereBetween, whereBetweenOrEqual, whereEndsWith, whereEquals, whereEquals, whereEquals, whereGreaterThan, whereGreaterThanOrEqual, whereIn, whereLessThan, whereLessThanOrEqual, whereStartsWith
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
countLazily, getFacets, getFacets, getIndexQuery, getQueryResult, lazily, lazily
addOrder, addOrder, afterQueryExecuted, afterStreamExecuted, andAlso, beforeQueryExecution, boost, closeSubclause, containsAll, containsAny, customSortUsing, fuzzy, getDocumentConvention, highlight, highlight, highlight, include, include, intersect, invokeAfterQueryExecuted, invokeAfterStreamExecuted, negateNext, noCaching, noTracking, openSubclause, orderBy, orderByDescending, orElse, proximity, randomOrdering, randomOrdering, search, search, setAllowMultipleIndexEntriesForSameDocumentToResultTransformer, setHighlighterTags, setHighlighterTags, showTimings, skip, statistics, take, usingDefaultField, usingDefaultOperator, waitForNonStaleResults, waitForNonStaleResults, waitForNonStaleResultsAsOf, waitForNonStaleResultsAsOf, waitForNonStaleResultsAsOf, waitForNonStaleResultsAsOf, waitForNonStaleResultsAsOfLastWrite, waitForNonStaleResultsAsOfLastWrite, waitForNonStaleResultsAsOfNow, waitForNonStaleResultsAsOfNow, where, whereBetween, whereBetweenOrEqual, whereEndsWith, whereEquals, whereEquals, whereEquals, whereGreaterThan, whereGreaterThanOrEqual, whereIn, whereLessThan, whereLessThanOrEqual, whereStartsWith
public DocumentQuery(Class<T> clazz, InMemoryDocumentSessionOperations session, IDatabaseCommands databaseCommands, String indexName, String[] fieldsToFetch, String[] projectionFields, List<IDocumentQueryListener> queryListeners, boolean isMapReduce)
DocumentQuery
class.session
- databaseCommands
- indexName
- fieldsToFetch
- projectionFields
- queryListeners
- isMapReduce
- public DocumentQuery(DocumentQuery<T> other)
DocumentQuery
class.other
- public <TProjection> IDocumentQuery<TProjection> selectFields(Class<TProjection> projectionClass)
selectFields
in interface IDocumentQuery<T>
projectionClass
- The class of the projectionpublic IDocumentQuery<T> distinct()
IDocumentQueryBase
distinct
in interface IAbstractDocumentQuery<T>
distinct
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
distinct
in class AbstractDocumentQuery<T,DocumentQuery<T>>
public boolean isDistinct()
IDocumentQuery
isDistinct
in interface IDocumentQuery<T>
public IDocumentQuery<T> setResultTransformer(String resultsTransformer)
IDocumentQueryBase
setResultTransformer
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public <TTransformer extends AbstractTransformerCreationTask,TTransformerResult> IDocumentQuery<TTransformerResult> setResultTransformer(Class<TTransformer> transformerClass, Class<TTransformerResult> resultClass)
IDocumentQuery
setResultTransformer
in interface IDocumentQuery<T>
public IDocumentQuery<T> orderByScore()
IDocumentQueryBase
orderByScore
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public IDocumentQuery<T> orderByScoreDescending()
IDocumentQueryBase
orderByScoreDescending
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public IDocumentQuery<T> explainScores()
IDocumentQueryBase
explainScores
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public IDocumentQuery<T> sortByDistance()
IDocumentQueryBase
sortByDistance
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public IDocumentQuery<T> sortByDistance(double lat, double lng)
IDocumentQueryBase
sortByDistance
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public IDocumentQuery<T> sortByDistance(double lat, double lng, String sortedFieldName)
IDocumentQueryBase
sortByDistance
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public IDocumentQuery<T> setTransformerParameters(Map<String,RavenJToken> transformerParameters)
IDocumentQuery
setTransformerParameters
in interface IDocumentQuery<T>
public <TProjection> IDocumentQuery<TProjection> selectFields(Class<TProjection> projectionClass, String... fields)
selectFields
in interface IDocumentQuery<T>
projectionClass
- The class of the projectionfields
- The fields.public <TProjection> IDocumentQuery<TProjection> selectFields(Class<TProjection> projectionClass, String[] fields, String[] projections)
selectFields
in interface IDocumentQuery<T>
projectionClass
- The class of the projectionfields
- projections
- public IDocumentQuery<T> withinRadiusOf(double radius, double latitude, double longitude)
IDocumentQueryBase
withinRadiusOf
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
radius
- The radius.latitude
- The latitude.longitude
- The longitude.public IDocumentQuery<T> withinRadiusOf(String fieldName, double radius, double latitude, double longitude)
IDocumentQueryBase
withinRadiusOf
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
fieldName
- The field name for the radius.radius
- The radius.latitude
- The latitude.longitude
- The longitude.public IDocumentQuery<T> withinRadiusOf(double radius, double latitude, double longitude, SpatialOptions.SpatialUnits radiusUnits)
IDocumentQueryBase
withinRadiusOf
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
radius
- The radius.latitude
- The latitude.longitude
- The longitude.radiusUnits
- The unit of the radius.public IDocumentQuery<T> withinRadiusOf(String fieldName, double radius, double latitude, double longitude, SpatialOptions.SpatialUnits radiusUnits)
IDocumentQueryBase
withinRadiusOf
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
fieldName
- The field name for the radius.radius
- The radius.latitude
- The latitude.longitude
- The longitude.radiusUnits
- The unit of the radius.public IDocumentQuery<T> relatesToShape(String fieldName, String shapeWKT, SpatialOptions.SpatialRelation rel)
IDocumentQueryBase
relatesToShape
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
fieldName
- The name of the field containg the shape to use for filtering.shapeWKT
- The query shape.rel
- Spatial relation to checkpublic IDocumentQuery<T> relatesToShape(String fieldName, String shapeWKT, SpatialOptions.SpatialRelation rel, double distanceErroPct)
IDocumentQueryBase
relatesToShape
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
fieldName
- The name of the field containg the shape to use for filtering.shapeWKT
- The query shape.rel
- Spatial relation to checkdistanceErroPct
- The allowed error percentage.public IDocumentQuery<T> spatial(String fieldName, SpatialCriteria criteria)
IDocumentQuery
spatial
in interface IDocumentQuery<T>
fieldName
- Spatial field name.criteria
- Spatial criteria factorypublic IDocumentQuery<T> not()
IDocumentQueryBase
not
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public <TValue> IDocumentQuery<T> whereEquals(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
IDocumentQueryBase
whereEquals
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public <TValue> IDocumentQuery<T> whereEquals(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value, boolean isAnalyzed)
IDocumentQueryBase
whereEquals
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public <TValue> IDocumentQuery<T> whereIn(com.mysema.query.types.Expression<? super TValue> propertySelector, Collection<TValue> values)
IDocumentQueryBase
whereIn
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public <TValue> IDocumentQuery<T> whereStartsWith(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
IDocumentQueryBase
whereStartsWith
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Property selector for the field.value
- The value.public <TValue> IDocumentQuery<T> whereEndsWith(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
IDocumentQueryBase
whereEndsWith
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Property selector for the field.value
- The value.public <TValue> IDocumentQuery<T> whereBetween(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue start, TValue end)
IDocumentQueryBase
whereBetween
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Property selector for the field.start
- The start.end
- The end.public <TValue> IDocumentQuery<T> whereBetweenOrEqual(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue start, TValue end)
IDocumentQueryBase
whereBetweenOrEqual
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Property selector for the field.start
- The start.end
- The end.public <TValue> IDocumentQuery<T> whereGreaterThan(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
IDocumentQueryBase
whereGreaterThan
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Property selector for the field.value
- The value.public <TValue> IDocumentQuery<T> whereGreaterThanOrEqual(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
IDocumentQueryBase
whereGreaterThanOrEqual
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Property selector for the field.value
- The value.public <TValue> IDocumentQuery<T> whereLessThan(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
IDocumentQueryBase
whereLessThan
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Property selector for the field.value
- The value.public <TValue> IDocumentQuery<T> whereLessThanOrEqual(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
IDocumentQueryBase
whereLessThanOrEqual
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Property selector for the field.value
- The value.public <TValue> IDocumentQuery<T> orderBy(com.mysema.query.types.Expression<?>... propertySelectors)
IDocumentQueryBase
orderBy
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelectors
- Property selector for the fields.public <TValue> IDocumentQuery<T> orderByDescending(com.mysema.query.types.Expression<?>... propertySelectors)
IDocumentQueryBase
orderByDescending
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelectors
- Property selectors for the fields.public <TValue> IDocumentQuery<T> highlight(com.mysema.query.types.Expression<?> propertySelector, int fragmentLength, int fragmentCount, com.mysema.query.types.path.ListPath<?,?> fragmentsPropertySelector)
IDocumentQueryBase
highlight
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- The property to highlight.fragmentLength
- The fragment length.fragmentCount
- The maximum number of fragments for the field.fragmentsPropertySelector
- The property to put highlightings into.public <TValue> IDocumentQuery<T> highlight(com.mysema.query.types.Expression<?> propertySelector, int fragmentLength, int fragmentCount, Reference<FieldHighlightings> highlightings)
IDocumentQueryBase
highlight
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- The property to highlight.fragmentLength
- The fragment length.fragmentCount
- The maximum number of fragment for the field.highlightings
- Field highlightings for all results.public <TValue> IDocumentQuery<T> highlight(com.mysema.query.types.Expression<?> propertySelector, com.mysema.query.types.Expression<?> keyPropertySelector, int fragmentLength, int fragmentCount, Reference<FieldHighlightings> highlightings)
IDocumentQueryBase
highlight
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- The property to highlight.keyPropertySelector
- The key property to associate highlights with.fragmentLength
- The fragment length.fragmentCount
- The maximum number of fragment for the field.highlightings
- Field highlightings for all results.public <TValue> IDocumentQuery<T> addOrder(com.mysema.query.types.Expression<?> propertySelector, boolean descending)
IDocumentQueryBase
addOrder
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Property selector for the field.descending
- If set to true [descending]public <TValue> IDocumentQuery<T> search(com.mysema.query.types.Expression<?> propertySelector, String searchTerms)
IDocumentQueryBase
search
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Expression marking a field in which terms should be looked forsearchTerms
- Space separated terms e.g. 'John Adam' means that we will look in selected field for 'John' or 'Adam'.public <TValue> IDocumentQuery<T> search(com.mysema.query.types.Expression<?> propertySelector, String searchTerms, EscapeQueryOptions escapeQueryOptions)
IDocumentQueryBase
search
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
propertySelector
- Expression marking a field in which terms should be looked forsearchTerms
- Space separated terms e.g. 'John Adam' means that we will look in selected field for 'John' or 'Adam'.escapeQueryOptions
- Terms escaping strategy. One of the following: EscapeAll, AllowPostfixWildcard, AllowAllWildcards, RawQuery. Default: EscapeQueryOptions.RawQuerypublic IDocumentQuery<T> containsAny(com.mysema.query.types.Expression<?> propertySelector, Collection<Object> values)
containsAny
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public IDocumentQuery<T> containsAll(com.mysema.query.types.Expression<?> propertySelector, Collection<Object> values)
containsAll
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
public IDocumentQuery<T> spatial(com.mysema.query.types.Path<?> path, SpatialCriteria criteria)
IDocumentQuery
spatial
in interface IDocumentQuery<T>
path
- Spatial field name.criteria
- Spatial criteria factorypublic String toString()
AbstractDocumentQuery
String
that represents the query for this instance.toString
in class AbstractDocumentQuery<T,DocumentQuery<T>>
public Lazy<FacetResults> toFacetsLazy(String facetSetupDoc)
IDocumentQuery
toFacetsLazy
in interface IDocumentQuery<T>
public Lazy<FacetResults> toFacetsLazy(String facetSetupDoc, int start)
IDocumentQuery
toFacetsLazy
in interface IDocumentQuery<T>
public Lazy<FacetResults> toFacetsLazy(String facetSetupDoc, int start, Integer pageSize)
IDocumentQuery
toFacetsLazy
in interface IDocumentQuery<T>
public Lazy<FacetResults> toFacetsLazy(List<Facet> facets)
IDocumentQuery
toFacetsLazy
in interface IDocumentQuery<T>
public Lazy<FacetResults> toFacetsLazy(List<Facet> facets, int start)
IDocumentQuery
toFacetsLazy
in interface IDocumentQuery<T>
public Lazy<FacetResults> toFacetsLazy(List<Facet> facets, int start, Integer pageSize)
IDocumentQuery
toFacetsLazy
in interface IDocumentQuery<T>
public FacetResults toFacets(String facetSetupDoc)
IDocumentQuery
toFacets
in interface IDocumentQuery<T>
public FacetResults toFacets(String facetSetupDoc, int start)
IDocumentQuery
toFacets
in interface IDocumentQuery<T>
public FacetResults toFacets(String facetSetupDoc, int start, Integer pageSize)
IDocumentQuery
toFacets
in interface IDocumentQuery<T>
public FacetResults toFacets(List<Facet> facets)
IDocumentQuery
toFacets
in interface IDocumentQuery<T>
public FacetResults toFacets(List<Facet> facets, int start)
IDocumentQuery
toFacets
in interface IDocumentQuery<T>
public FacetResults toFacets(List<Facet> facets, int start, Integer pageSize)
IDocumentQuery
toFacets
in interface IDocumentQuery<T>
public List<T> toList()
IDocumentQuery
toList
in interface IDocumentQuery<T>
public T single()
IDocumentQuery
single
in interface IDocumentQuery<T>
single
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
single
in class AbstractDocumentQuery<T,DocumentQuery<T>>
public T first()
IDocumentQuery
first
in interface IDocumentQuery<T>
first
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
first
in class AbstractDocumentQuery<T,DocumentQuery<T>>
public boolean any()
IDocumentQuery
any
in interface IDocumentQuery<T>
public T firstOrDefault()
IDocumentQuery
firstOrDefault
in interface IDocumentQuery<T>
firstOrDefault
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
firstOrDefault
in class AbstractDocumentQuery<T,DocumentQuery<T>>
public T singleOrDefault()
IDocumentQuery
singleOrDefault
in interface IDocumentQuery<T>
singleOrDefault
in interface IDocumentQueryBase<T,IDocumentQuery<T>>
singleOrDefault
in class AbstractDocumentQuery<T,DocumentQuery<T>>
Copyright © 2016. All Rights Reserved.