public interface IDocumentQueryBase<T,TSelf extends IDocumentQueryBase<T,TSelf>>
Modifier and Type | Method and Description |
---|---|
<TValue> TSelf |
addOrder(com.mysema.query.types.Expression<?> propertySelector,
boolean descending)
Adds an ordering for a specific field to the query
|
TSelf |
addOrder(String fieldName,
boolean descending)
Adds an ordering for a specific field to the query
|
TSelf |
addOrder(String fieldName,
boolean descending,
Class<?> fieldType)
Adds an ordering for a specific field to the query and specifies the type of field for sorting purposes
|
void |
afterQueryExecuted(Action1<QueryResult> afterQueryExecuted)
Called externally to raise the after query executed callback
|
void |
afterStreamExecuted(Function1<Reference<RavenJObject>,Boolean> afterStreamExecutedCallback)
Callback to get the results of the stream
|
TSelf |
andAlso()
Add an AND to the query
|
TSelf |
beforeQueryExecution(Action1<IndexQuery> beforeQueryExecution)
Allows you to modify the index query before it is sent to the server
|
TSelf |
boost(Double boost)
Specifies a boost weight to the last where clause.
|
TSelf |
closeSubclause()
Simplified method for closing a clause within the query
|
TSelf |
containsAll(com.mysema.query.types.Expression<?> propertySelector,
Collection<Object> values)
Performs a query matching ALL of the provided values against the given field (AND)
|
TSelf |
containsAll(String fieldName,
Collection<Object> values)
Performs a query matching ALL of the provided values against the given field (AND)
|
TSelf |
containsAny(com.mysema.query.types.Expression<?> propertySelector,
Collection<Object> values)
Performs a query matching ANY of the provided values against the given field (OR)
|
TSelf |
containsAny(String fieldName,
Collection<Object> values)
Performs a query matching ANY of the provided values against the given field (OR)
|
TSelf |
customSortUsing(String typeName,
boolean descending)
Order the search results randomly
|
TSelf |
distinct()
Apply distinct operation to this query
|
TSelf |
explainScores()
Adds explanations of scores calculated for queried documents to the query result
|
T |
first()
Returns first element or throws if sequence is empty.
|
T |
firstOrDefault()
Returns first element or default value for type if sequence is empty.
|
TSelf |
fuzzy(Double fuzzy)
Specifies a fuzziness factor to the single word term in the last where clause
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Fuzzy%20Searches
|
DocumentConvention |
getDocumentConvention()
Gets the document convention from the query session
|
<TValue> TSelf |
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> TSelf |
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> TSelf |
highlight(com.mysema.query.types.Expression<?> propertySelector,
int fragmentLength,
int fragmentCount,
Reference<FieldHighlightings> highlightings)
Adds matches highlighting for the specified field.
|
TSelf |
highlight(String fieldName,
int fragmentLength,
int fragmentCount,
Reference<FieldHighlightings> highlightings)
Adds matches highlighting for the specified field.
|
TSelf |
highlight(String fieldName,
int fragmentLength,
int fragmentCount,
String fragmentsField)
Adds matches highlighting for the specified field.
|
TSelf |
highlight(String fieldName,
String fieldKeyName,
int fragmentLength,
int fragmentCount,
Reference<FieldHighlightings> highlightings)
Adds matches highlighting for the specified field.
|
TSelf |
include(com.mysema.query.types.Path<?> path)
Includes the specified path in the query, loading the document specified in that path
|
TSelf |
include(String path)
Includes the specified path in the query, loading the document specified in that path
|
TSelf |
intersect()
Partition the query so we can intersect different parts of the query
across different index entries.
|
void |
invokeAfterQueryExecuted(QueryResult result)
Called externally to raise the after query executed callback
|
void |
invokeAfterStreamExecuted(Reference<RavenJObject> resultRef)
Called externally to raise the after query executed callback
|
void |
negateNext()
Negate the next operation
|
TSelf |
noCaching()
Disables caching for query results.
|
TSelf |
not()
Negate the next operation
|
TSelf |
noTracking()
Disables tracking for queried entities by Raven's Unit of Work.
|
TSelf |
openSubclause()
Simplified method for opening a new clause within the query
|
<TValue> TSelf |
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.
|
TSelf |
orderBy(String... fields)
Order the results by the specified fields
The fields are the names of the fields to sort, defaulting to sorting by ascending.
|
<TValue> TSelf |
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.
|
TSelf |
orderByDescending(String... fields)
Order the results by the specified fields
The fields are the names of the fields to sort, defaulting to sorting by descending.
|
TSelf |
orderByScore()
Adds an ordering by score for a specific field to the query
|
TSelf |
orderByScoreDescending()
Adds an ordering by score for a specific field to the query
|
TSelf |
orElse()
Add an OR to the query
|
TSelf |
proximity(int proximity)
Specifies a proximity distance for the phrase in the last where clause
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Proximity%20Searches
|
TSelf |
randomOrdering()
Order the search results randomly
|
TSelf |
randomOrdering(String seed)
Order the search results randomly using the specified seed
this is useful if you want to have repeatable random queries
|
TSelf |
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
|
TSelf |
relatesToShape(String fieldName,
String shapeWKT,
SpatialOptions.SpatialRelation rel,
double distanceErrorPct)
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> TSelf |
search(com.mysema.query.types.Expression<?> propertySelector,
String searchTerms)
Perform a search for documents which fields that match the searchTerms.
|
<TValue> TSelf |
search(com.mysema.query.types.Expression<?> propertySelector,
String searchTerms,
EscapeQueryOptions escapeQueryOptions)
Perform a search for documents which fields that match the searchTerms.
|
TSelf |
search(String fieldName,
String searchTerms)
Perform a search for documents which fields that match the searchTerms.
|
TSelf |
search(String fieldName,
String searchTerms,
EscapeQueryOptions escapeQueryOptions)
Perform a search for documents which fields that match the searchTerms.
|
TSelf |
setAllowMultipleIndexEntriesForSameDocumentToResultTransformer(boolean val)
If set to true, this property will send multiple index entries from the same document (assuming the index project them)
to the result transformer function.
|
TSelf |
setHighlighterTags(String[] preTags,
String[] postTags)
Sets the tags to highlight matches with.
|
TSelf |
setHighlighterTags(String preTag,
String postTag)
Sets the tags to highlight matches with.
|
TSelf |
setResultTransformer(String resultsTransformer)
Sets a transformer to use after executing a query
|
TSelf |
showTimings()
Enables calculation of timings for various parts of a query (Lucene search, loading documents, transforming results).
|
T |
single()
Returns first element or throws if sequence is empty or contains more than one element.
|
T |
singleOrDefault()
Returns first element or default value for given type if sequence is empty.
|
TSelf |
skip(int count)
Skips the specified count.
|
TSelf |
sortByDistance()
Sorts the query results by distance.
|
TSelf |
sortByDistance(double lat,
double lng)
Sorts the query results by distance.
|
TSelf |
sortByDistance(double lat,
double lng,
String sortedFieldName)
Sorts the query results by distance.
|
TSelf |
statistics(Reference<RavenQueryStatistics> stats)
Provide statistics about the query, such as total count of matching records
|
TSelf |
take(int count)
Takes the specified count.
|
TSelf |
usingDefaultField(String field)
Select the default field to use for this query
|
TSelf |
usingDefaultOperator(QueryOperator queryOperator)
Select the default operator to use for this query
|
TSelf |
waitForNonStaleResults()
EXPERT ONLY: Instructs the query to wait for non stale results.
|
TSelf |
waitForNonStaleResults(long waitTimeout)
EXPERT ONLY: Instructs the query to wait for non stale results for the specified wait timeout.
|
TSelf |
waitForNonStaleResultsAsOf(Date cutOff)
Instructs the query to wait for non stale results as of the cutoff date.
|
TSelf |
waitForNonStaleResultsAsOf(Date cutOff,
long waitTimeout)
Instructs the query to wait for non stale results as of the cutoff date for the specified timeout
|
TSelf |
waitForNonStaleResultsAsOf(Etag cutOffEtag)
Instructs the query to wait for non stale results as of the cutoff etag.
|
TSelf |
waitForNonStaleResultsAsOf(Etag cutOffEtag,
long waitTimeout)
Instructs the query to wait for non stale results as of the cutoff etag for the specified timeout.
|
TSelf |
waitForNonStaleResultsAsOfLastWrite()
Instructs the query to wait for non stale results as of the last write made by any session belonging to the
current document store.
|
TSelf |
waitForNonStaleResultsAsOfLastWrite(long waitTimeout)
Instructs the query to wait for non stale results as of the last write made by any session belonging to the
current document store.
|
TSelf |
waitForNonStaleResultsAsOfNow()
Instructs the query to wait for non stale results as of now.
|
TSelf |
waitForNonStaleResultsAsOfNow(long waitTimeout)
Instructs the query to wait for non stale results as of now for the specified timeout.
|
TSelf |
where(String whereClause)
Filter the results from the index using the specified where clause.
|
<TValue> TSelf |
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
|
TSelf |
whereBetween(String fieldName,
Object start,
Object end)
Matches fields where the value is between the specified start and end, exclusive
|
<TValue> TSelf |
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
|
TSelf |
whereBetweenOrEqual(String fieldName,
Object start,
Object end)
Matches fields where the value is between the specified start and end, inclusive
|
<TValue> TSelf |
whereEndsWith(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields which ends with the specified value.
|
TSelf |
whereEndsWith(String fieldName,
Object value)
Matches fields which ends with the specified value.
|
<TValue> TSelf |
whereEquals(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches exact value
Defaults to NotAnalyzed
|
<TValue> TSelf |
whereEquals(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value,
boolean isAnalyzed)
Matches exact value
Defaults to allow wildcards only if analyzed
|
TSelf |
whereEquals(String fieldName,
Object value)
Matches exact value
Defaults to NotAnalyzed
|
TSelf |
whereEquals(String fieldName,
Object value,
boolean isAnalyzed)
Matches exact value
Default to allow wildcards only if analyzed
|
TSelf |
whereEquals(WhereParams whereParams)
Matches exact value
|
<TValue> TSelf |
whereGreaterThan(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields where the value is greater than the specified value
|
TSelf |
whereGreaterThan(String fieldName,
Object value)
Matches fields where the value is greater than the specified value
|
<TValue> TSelf |
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
|
TSelf |
whereGreaterThanOrEqual(String fieldName,
Object value)
Matches fields where the value is greater than or equal to the specified value
|
<TValue> TSelf |
whereIn(com.mysema.query.types.Expression<? super TValue> propertySelector,
Collection<TValue> values)
Check that the field has one of the specified values
|
TSelf |
whereIn(String fieldName,
Collection<?> values)
Check that the field has one of the specified values
|
<TValue> TSelf |
whereLessThan(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields where the value is less than the specified value
|
TSelf |
whereLessThan(String fieldName,
Object value)
Matches fields where the value is less than the specified value
|
<TValue> TSelf |
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
|
TSelf |
whereLessThanOrEqual(String fieldName,
Object value)
Matches fields where the value is less than or equal to the specified value
|
<TValue> TSelf |
whereStartsWith(com.mysema.query.types.Expression<? super TValue> propertySelector,
TValue value)
Matches fields which starts with the specified value.
|
TSelf |
whereStartsWith(String fieldName,
Object value)
Matches fields which starts with the specified value.
|
TSelf |
withinRadiusOf(double radius,
double latitude,
double longitude)
Filter matches to be inside the specified radius
|
TSelf |
withinRadiusOf(double radius,
double latitude,
double longitude,
SpatialOptions.SpatialUnits radiusUnits)
Filter matches to be inside the specified radius
|
TSelf |
withinRadiusOf(String fieldName,
double radius,
double latitude,
double longitude)
Filter matches to be inside the specified radius
|
TSelf |
withinRadiusOf(String fieldName,
double radius,
double latitude,
double longitude,
SpatialOptions.SpatialUnits radiusUnits)
Filter matches to be inside the specified radius
|
DocumentConvention getDocumentConvention()
TSelf not()
void negateNext()
TSelf include(String path)
TSelf include(com.mysema.query.types.Path<?> path)
path
- The path.TSelf take(int count)
count
- Maximum number of items to take.TSelf skip(int count)
count
- Number of items to skip.T firstOrDefault()
T first()
T singleOrDefault()
T single()
TSelf where(String whereClause)
whereClause
- Lucene-syntax based query predicate.TSelf whereEquals(String fieldName, Object value)
fieldName
- value
- <TValue> TSelf whereEquals(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
propertySelector
- value
- TSelf whereEquals(String fieldName, Object value, boolean isAnalyzed)
fieldName
- value
- isAnalyzed
- <TValue> TSelf whereEquals(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value, boolean isAnalyzed)
propertySelector
- value
- isAnalyzed
- TSelf whereEquals(WhereParams whereParams)
whereParams
- TSelf whereIn(String fieldName, Collection<?> values)
fieldName
- values
- <TValue> TSelf whereIn(com.mysema.query.types.Expression<? super TValue> propertySelector, Collection<TValue> values)
propertySelector
- values
- TSelf whereStartsWith(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.<TValue> TSelf whereStartsWith(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
propertySelector
- Property selector for the field.value
- The value.TSelf whereEndsWith(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.<TValue> TSelf whereEndsWith(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
propertySelector
- Property selector for the field.value
- The value.TSelf whereBetween(String fieldName, Object start, Object end)
fieldName
- Name of the field.start
- The start.end
- The end.<TValue> TSelf whereBetween(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue start, TValue end)
propertySelector
- Property selector for the field.start
- The start.end
- The end.TSelf whereBetweenOrEqual(String fieldName, Object start, Object end)
fieldName
- Name of the field.start
- The start.end
- The end.<TValue> TSelf whereBetweenOrEqual(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue start, TValue end)
propertySelector
- Property selector for the field.start
- The start.end
- The end.TSelf whereGreaterThan(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.<TValue> TSelf whereGreaterThan(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
propertySelector
- Property selector for the field.value
- The value.TSelf whereGreaterThanOrEqual(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.<TValue> TSelf whereGreaterThanOrEqual(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
propertySelector
- Property selector for the field.value
- The value.TSelf whereLessThan(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.<TValue> TSelf whereLessThan(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
propertySelector
- Property selector for the field.value
- The value.TSelf whereLessThanOrEqual(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.<TValue> TSelf whereLessThanOrEqual(com.mysema.query.types.Expression<? super TValue> propertySelector, TValue value)
propertySelector
- Property selector for the field.value
- The value.TSelf andAlso()
TSelf orElse()
TSelf boost(Double boost)
boost
- boosting factor where 1.0 is default, less than 1.0 is lower weight, greater than 1.0 is higher weightTSelf fuzzy(Double fuzzy)
fuzzy
- 0.0 to 1.0 where 1.0 means closer matchTSelf proximity(int proximity)
proximity
- number of words withinTSelf withinRadiusOf(double radius, double latitude, double longitude)
radius
- The radius.latitude
- The latitude.longitude
- The longitude.TSelf withinRadiusOf(double radius, double latitude, double longitude, SpatialOptions.SpatialUnits radiusUnits)
radius
- The radius.latitude
- The latitude.longitude
- The longitude.radiusUnits
- The unit of the radius.TSelf withinRadiusOf(String fieldName, double radius, double latitude, double longitude)
fieldName
- The field name for the radius.radius
- The radius.latitude
- The latitude.longitude
- The longitude.TSelf withinRadiusOf(String fieldName, double radius, double latitude, double longitude, SpatialOptions.SpatialUnits radiusUnits)
fieldName
- The field name for the radius.radius
- The radius.latitude
- The latitude.longitude
- The longitude.radiusUnits
- The unit of the radius.TSelf relatesToShape(String fieldName, String shapeWKT, SpatialOptions.SpatialRelation rel)
fieldName
- The name of the field containg the shape to use for filtering.shapeWKT
- The query shape.rel
- Spatial relation to checkTSelf relatesToShape(String fieldName, String shapeWKT, SpatialOptions.SpatialRelation rel, double distanceErrorPct)
fieldName
- The name of the field containg the shape to use for filtering.shapeWKT
- The query shape.rel
- Spatial relation to checkdistanceErrorPct
- The allowed error percentage.TSelf sortByDistance()
TSelf sortByDistance(double lat, double lng)
TSelf sortByDistance(double lat, double lng, String sortedFieldName)
TSelf orderBy(String... fields)
fields
- The fields.<TValue> TSelf orderBy(com.mysema.query.types.Expression<?>... propertySelectors)
propertySelectors
- Property selector for the fields.TSelf orderByDescending(String... fields)
fields
- The fields<TValue> TSelf orderByDescending(com.mysema.query.types.Expression<?>... propertySelectors)
propertySelectors
- Property selectors for the fields.TSelf highlight(String fieldName, int fragmentLength, int fragmentCount, String fragmentsField)
fieldName
- The field name to highlight.fragmentLength
- The fragment length.fragmentCount
- The maximum number of fragments for the field.fragmentsField
- The field in query results item to put highlighing into.TSelf highlight(String fieldName, int fragmentLength, int fragmentCount, Reference<FieldHighlightings> highlightings)
fieldName
- The field name to highlight.fragmentLength
- The fragment length.fragmentCount
- The fragment count.highlightings
- The maximum number of fragments for the field.TSelf highlight(String fieldName, String fieldKeyName, int fragmentLength, int fragmentCount, Reference<FieldHighlightings> highlightings)
fieldName
- The field name to highlight.fieldKeyName
- The field key to associate highlights with.fragmentLength
- The fragment length.fragmentCount
- The fragment count.highlightings
- The maximum number of fragments for the field.<TValue> TSelf highlight(com.mysema.query.types.Expression<?> propertySelector, int fragmentLength, int fragmentCount, com.mysema.query.types.path.ListPath<?,?> fragmentsPropertySelector)
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.<TValue> TSelf highlight(com.mysema.query.types.Expression<?> propertySelector, int fragmentLength, int fragmentCount, Reference<FieldHighlightings> highlightings)
propertySelector
- The property to highlight.fragmentLength
- The fragment length.fragmentCount
- The maximum number of fragment for the field.highlightings
- Field highlightings for all results.<TValue> TSelf highlight(com.mysema.query.types.Expression<?> propertySelector, com.mysema.query.types.Expression<?> keyPropertySelector, int fragmentLength, int fragmentCount, Reference<FieldHighlightings> highlightings)
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.TSelf setHighlighterTags(String preTag, String postTag)
preTag
- Prefix tag.postTag
- Postfix tag.TSelf setHighlighterTags(String[] preTags, String[] postTags)
preTags
- Prefix tags.postTags
- Postfix tags.TSelf waitForNonStaleResultsAsOfNow()
TSelf waitForNonStaleResultsAsOfLastWrite()
TSelf waitForNonStaleResultsAsOfLastWrite(long waitTimeout)
waitTimeout
- Maximum time to wait for index query results to become non-stale before exception is thrown.TSelf waitForNonStaleResultsAsOfNow(long waitTimeout)
waitTimeout
- Maximum time to wait for index query results to become non-stale before exception is thrown.TSelf waitForNonStaleResultsAsOf(Date cutOff)
cutOff
- Index will be considered stale if modification date of last indexed document is greater than this value.TSelf waitForNonStaleResultsAsOf(Date cutOff, long waitTimeout)
cutOff
- Index will be considered stale if modification date of last indexed document is greater than this value.waitTimeout
- Maximum time to wait for index query results to become non-stale before exception is thrown.TSelf waitForNonStaleResultsAsOf(Etag cutOffEtag)
cutOffEtag
- Cutoff etag is used to check if the index has already process a document with the given
etag. Unlike Cutoff, which uses dates and is susceptible to clock synchronization issues between
machines, cutoff etag doesn't rely on both the server and client having a synchronized clock and
can work without it.
However, when used to query map/reduce indexes, it does NOT guarantee that the document that this
etag belong to is actually considered for the results.
What it does it guarantee that the document has been mapped, but not that the mapped values has been reduced.
Since map/reduce queries, by their nature, tend to be far less susceptible to issues with staleness, this is
considered to be an acceptable tradeoff.
If you need absolute no staleness with a map/reduce index, you will need to ensure synchronized clocks and
use the Cutoff date option, instead.TSelf waitForNonStaleResultsAsOf(Etag cutOffEtag, long waitTimeout)
cutOffEtag
- Cutoff etag is used to check if the index has already process a document with the given
etag. Unlike Cutoff, which uses dates and is susceptible to clock synchronization issues between
machines, cutoff etag doesn't rely on both the server and client having a synchronized clock and
can work without it.
However, when used to query map/reduce indexes, it does NOT guarantee that the document that this
etag belong to is actually considered for the results.
What it does it guarantee that the document has been mapped, but not that the mapped values has been reduced.
Since map/reduce queries, by their nature, tend to be far less susceptible to issues with staleness, this is
considered to be an acceptable tradeoff.
If you need absolute no staleness with a map/reduce index, you will need to ensure synchronized clocks and
use the Cutoff date option, instead.waitTimeout
- Maximum time to wait for index query results to become non-stale before exception is thrown.TSelf waitForNonStaleResults()
TSelf beforeQueryExecution(Action1<IndexQuery> beforeQueryExecution)
beforeQueryExecution
- TSelf waitForNonStaleResults(long waitTimeout)
waitTimeout
- Maximum time to wait for index query results to become non-stale before exception is thrown.TSelf randomOrdering()
TSelf randomOrdering(String seed)
seed
- TSelf customSortUsing(String typeName, boolean descending)
typeName
- descending
- TSelf addOrder(String fieldName, boolean descending)
fieldName
- Name of the field.descending
- If set to true [descending]<TValue> TSelf addOrder(com.mysema.query.types.Expression<?> propertySelector, boolean descending)
propertySelector
- Property selector for the field.descending
- If set to true [descending]TSelf addOrder(String fieldName, boolean descending, Class<?> fieldType)
fieldName
- Name of the field.descending
- If set to true [descending]fieldType
- The type of the field to be sorted.TSelf openSubclause()
TSelf closeSubclause()
TSelf search(String fieldName, String searchTerms)
fieldName
- Marks 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'.TSelf search(String fieldName, String searchTerms, EscapeQueryOptions escapeQueryOptions)
fieldName
- Marks 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.RawQuery<TValue> TSelf search(com.mysema.query.types.Expression<?> propertySelector, String searchTerms)
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'.<TValue> TSelf search(com.mysema.query.types.Expression<?> propertySelector, String searchTerms, EscapeQueryOptions escapeQueryOptions)
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.RawQueryTSelf intersect()
TSelf containsAny(String fieldName, Collection<Object> values)
fieldName
- values
- TSelf containsAny(com.mysema.query.types.Expression<?> propertySelector, Collection<Object> values)
propertySelector
- values
- TSelf containsAll(String fieldName, Collection<Object> values)
fieldName
- values
- TSelf containsAll(com.mysema.query.types.Expression<?> propertySelector, Collection<Object> values)
propertySelector
- values
- void afterQueryExecuted(Action1<QueryResult> afterQueryExecuted)
afterQueryExecuted
- void afterStreamExecuted(Function1<Reference<RavenJObject>,Boolean> afterStreamExecutedCallback)
afterStreamExecutedCallback
- void invokeAfterQueryExecuted(QueryResult result)
result
- void invokeAfterStreamExecuted(Reference<RavenJObject> resultRef)
resultRef
- TSelf statistics(Reference<RavenQueryStatistics> stats)
stats
- TSelf usingDefaultField(String field)
field
- TSelf usingDefaultOperator(QueryOperator queryOperator)
queryOperator
- TSelf noTracking()
TSelf noCaching()
TSelf setAllowMultipleIndexEntriesForSameDocumentToResultTransformer(boolean val)
val
- TSelf showTimings()
TSelf distinct()
TSelf setResultTransformer(String resultsTransformer)
resultsTransformer
- TSelf orderByScore()
TSelf orderByScoreDescending()
TSelf explainScores()
Copyright © 2016. All Rights Reserved.