T
- public interface IAbstractDocumentQuery<T>
Modifier and Type | Method and Description |
---|---|
IDocumentQuery<T> |
addOrder(String fieldName,
boolean descending)
Adds an ordering for a specific field to the query
|
IDocumentQuery<T> |
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 |
addRootType(Class<T> type) |
IDocumentQuery<T> |
andAlso()
Add an AND to the query
|
IDocumentQuery<T> |
boost(Double boost)
Specifies a boost weight to the last where clause.
|
IDocumentQuery<T> |
closeSubclause()
Simplified method for closing a clause within the query
|
IDocumentQuery<T> |
containsAll(String fieldName,
Collection<Object> values)
Performs a query matching ALL of the provided values against the given field (AND)
|
IDocumentQuery<T> |
containsAny(String fieldName,
Collection<Object> values)
Performs a query matching ANY of the provided values against the given field (OR)
|
IDocumentQuery<T> |
customSortUsing(String typeName) |
IDocumentQuery<T> |
customSortUsing(String className,
boolean descending)
Sort using custom sorter on the server
|
IDocumentQuery<T> |
distinct() |
IDocumentQuery<T> |
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
|
String |
getIndexQueried()
Get the name of the index being queried
|
Tuple<String,String> |
getLastEqualityTerm()
The last term that we asked the query to use equals on
|
Collection<String> |
getProjectionFields()
Gets the fields for projection
|
IDocumentQuery<T> |
highlight(String fieldName,
int fragmentLength,
int fragmentCount,
Reference<FieldHighlightings> highlightings)
Adds matches highlighting for the specified field.
|
IDocumentQuery<T> |
highlight(String fieldName,
int fragmentLength,
int fragmentCount,
String fragmentsField)
Adds matches highlighting for the specified field.
|
IDocumentQuery<T> |
highlight(String fieldName,
String fieldKeyName,
int fragmentLength,
int fragmentCount,
Reference<FieldHighlightings> highlightings)
Adds matches highlighting for the specified field on a Map/Reduce Index.
|
IDocumentQuery<T> |
include(Class<?> targetClass,
com.mysema.query.types.Path<?> path)
Includes the specified path in the query, loading the document specified in that path
|
IDocumentQuery<T> |
include(com.mysema.query.types.Path<?> path)
Includes the specified path in the query, loading the document specified in that path
|
IDocumentQuery<T> |
include(String path)
Includes the specified path in the query, loading the document specified in that path
|
IDocumentQuery<T> |
intersect() |
Iterator<T> |
iterator() |
void |
negateNext()
Negate the next operation
|
IDocumentQuery<T> |
openSubclause()
Simplified method for opening a new clause within the query
|
IDocumentQuery<T> |
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.
|
IDocumentQuery<T> |
orElse()
Add an OR to the query
|
IDocumentQuery<T> |
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
|
IDocumentQuery<T> |
randomOrdering()
Order the search results randomly
|
IDocumentQuery<T> |
randomOrdering(String seed)
Order the search results randomly using the specified seed
this is useful if you want to have repeatable random queries
|
IDocumentQuery<T> |
search(String fieldName,
String searchTerms)
Perform a search for documents which fields that match the searchTerms.
|
IDocumentQuery<T> |
search(String fieldName,
String searchTerms,
EscapeQueryOptions escapeQueryOptions)
Perform a search for documents which fields that match the searchTerms.
|
IDocumentQuery<T> |
setAllowMultipleIndexEntriesForSameDocumentToResultTransformer(boolean value) |
IDocumentQuery<T> |
setHighlighterTags(String[] preTags,
String[] postTags)
Sets the tags to highlight matches with.
|
IDocumentQuery<T> |
setHighlighterTags(String preTag,
String postTag)
Sets the tags to highlight matches with.
|
void |
setOriginalQueryType(Class originalType)
Sets the original query type incase of TransforWith usage.
|
IDocumentQuery<T> |
skip(int count)
Skips the specified count.
|
IDocumentQuery<T> |
take(int count)
Takes the specified count.
|
IDocumentQuery<T> |
waitForNonStaleResults()
EXPERT ONLY: Instructs the query to wait for non stale results.
|
IDocumentQuery<T> |
waitForNonStaleResults(long waitTimeout)
Instruct the query to wait for non stale result for the specified wait timeout.
|
IDocumentQuery<T> |
waitForNonStaleResultsAsOf(Date cutOff)
Instructs the query to wait for non stale results as of the cutoff date.
|
IDocumentQuery<T> |
waitForNonStaleResultsAsOf(Date cutOff,
long waitTimeout)
Instructs the query to wait for non stale results as of the cutoff date for the specified timeout
|
IDocumentQuery<T> |
waitForNonStaleResultsAsOfNow()
Instructs the query to wait for non stale results as of now.
|
IDocumentQuery<T> |
waitForNonStaleResultsAsOfNow(long waitTimeout)
Instructs the query to wait for non stale results as of now for the specified timeout.
|
IDocumentQuery<T> |
where(String whereClause)
Filter the results from the index using the specified where clause.
|
IDocumentQuery<T> |
whereBetween(String fieldName,
Object start,
Object end)
Matches fields where the value is between the specified start and end, exclusive
|
IDocumentQuery<T> |
whereBetweenOrEqual(String fieldName,
Object start,
Object end)
Matches fields where the value is between the specified start and end, inclusive
|
IDocumentQuery<T> |
whereEndsWith(String fieldName,
Object value)
Matches fields which ends with the specified value.
|
IDocumentQuery<T> |
whereEquals(String fieldName,
Object value)
Matches exact value
Defaults to NotAnalyzed
|
IDocumentQuery<T> |
whereEquals(String fieldName,
Object value,
boolean isAnalyzed)
Matches exact value
Default to allow wildcard only if analyzed
|
IDocumentQuery<T> |
whereEquals(WhereParams whereParams)
Matches exact value
|
IDocumentQuery<T> |
whereGreaterThan(String fieldName,
Object value)
Matches fields where the value is greater than the specified value
|
IDocumentQuery<T> |
whereGreaterThanOrEqual(String fieldName,
Object value)
Matches fields where the value is greater than or equal to the specified value
|
IDocumentQuery<T> |
whereIn(String fieldName,
Collection<?> values)
Check that the field has one of the specified value
|
IDocumentQuery<T> |
whereLessThan(String fieldName,
Object value)
Matches fields where the value is less than the specified value
|
IDocumentQuery<T> |
whereLessThanOrEqual(String fieldName,
Object value)
Matches fields where the value is less than or equal to the specified value
|
IDocumentQuery<T> |
whereStartsWith(String fieldName,
Object value)
Matches fields which starts with the specified value.
|
String getIndexQueried()
DocumentConvention getDocumentConvention()
IDocumentQuery<T> waitForNonStaleResults(long waitTimeout)
waitTimeout
- The wait timeout in milisCollection<String> getProjectionFields()
IDocumentQuery<T> randomOrdering()
IDocumentQuery<T> randomOrdering(String seed)
seed
- IDocumentQuery<T> customSortUsing(String typeName)
IDocumentQuery<T> customSortUsing(String className, boolean descending)
IDocumentQuery<T> addOrder(String fieldName, boolean descending)
fieldName
- Name of the field.descending
- If set to true [descending]IDocumentQuery<T> 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 sortedIDocumentQuery<T> include(com.mysema.query.types.Path<?> path)
path
- IDocumentQuery<T> include(String path)
path
- IDocumentQuery<T> include(Class<?> targetClass, com.mysema.query.types.Path<?> path)
path
- IDocumentQuery<T> take(int count)
count
- The count.IDocumentQuery<T> skip(int count)
count
- The count.IDocumentQuery<T> where(String whereClause)
whereClause
- The where clause.IDocumentQuery<T> whereEquals(String fieldName, Object value)
fieldName
- value
- IDocumentQuery<T> whereEquals(String fieldName, Object value, boolean isAnalyzed)
fieldName
- value
- isAnalyzed
- IDocumentQuery<T> openSubclause()
IDocumentQuery<T> closeSubclause()
IDocumentQuery<T> whereEquals(WhereParams whereParams)
whereParams
- void negateNext()
IDocumentQuery<T> whereIn(String fieldName, Collection<?> values)
fieldName
- values
- IDocumentQuery<T> whereStartsWith(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereEndsWith(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereBetween(String fieldName, Object start, Object end)
fieldName
- Name of the field.start
- The start.end
- The end.IDocumentQuery<T> whereBetweenOrEqual(String fieldName, Object start, Object end)
fieldName
- Name of the field.start
- The start.end
- The end.IDocumentQuery<T> whereGreaterThan(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereGreaterThanOrEqual(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereLessThan(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereLessThanOrEqual(String fieldName, Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> andAlso()
IDocumentQuery<T> orElse()
IDocumentQuery<T> boost(Double boost)
boost
- boosting factor where 1.0 is default, less than 1.0 is lower weight, greater than 1.0 is higher weightIDocumentQuery<T> fuzzy(Double fuzzy)
fuzzy
- 0.0 to 1.0 where 1.0 means closer matchIDocumentQuery<T> proximity(int proximity)
proximity
- number of words withinIDocumentQuery<T> orderBy(String... fields)
fields
- The fields.IDocumentQuery<T> 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.IDocumentQuery<T> 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.IDocumentQuery<T> 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
- Field highlightings for all results.IDocumentQuery<T> setHighlighterTags(String preTag, String postTag)
preTag
- Prefix tag.postTag
- Postfix tag.IDocumentQuery<T> setHighlighterTags(String[] preTags, String[] postTags)
preTags
- Prefix tags.postTags
- Postfix tags.IDocumentQuery<T> waitForNonStaleResultsAsOfNow()
IDocumentQuery<T> waitForNonStaleResultsAsOfNow(long waitTimeout)
waitTimeout
- The wait timeout.IDocumentQuery<T> waitForNonStaleResultsAsOf(Date cutOff)
cutOff
- The cut off.IDocumentQuery<T> waitForNonStaleResultsAsOf(Date cutOff, long waitTimeout)
cutOff
- The cut off.waitTimeout
- The wait timeout.IDocumentQuery<T> waitForNonStaleResults()
IDocumentQuery<T> search(String fieldName, String searchTerms)
fieldName
- searchTerms
- IDocumentQuery<T> search(String fieldName, String searchTerms, EscapeQueryOptions escapeQueryOptions)
fieldName
- searchTerms
- Tuple<String,String> getLastEqualityTerm()
IDocumentQuery<T> intersect()
IDocumentQuery<T> distinct()
IDocumentQuery<T> containsAny(String fieldName, Collection<Object> values)
fieldName
- values
- IDocumentQuery<T> containsAll(String fieldName, Collection<Object> values)
fieldName
- values
- IDocumentQuery<T> setAllowMultipleIndexEntriesForSameDocumentToResultTransformer(boolean value)
void setOriginalQueryType(Class originalType)
Copyright © 2016. All Rights Reserved.