T
- public interface IAbstractDocumentQuery<T>
Modifier and Type | Method and Description |
---|---|
IDocumentQuery<T> |
addOrder(java.lang.String fieldName,
boolean descending)
Adds an ordering for a specific field to the query
|
IDocumentQuery<T> |
addOrder(java.lang.String fieldName,
boolean descending,
java.lang.Class<?> fieldType)
Adds an ordering for a specific field to the query and specifies the type of field for sorting purposes
|
void |
addRootType(java.lang.Class<T> type) |
IDocumentQuery<T> |
andAlso()
Add an AND to the query
|
IDocumentQuery<T> |
boost(java.lang.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(java.lang.String fieldName,
java.util.Collection<java.lang.Object> values)
Performs a query matching ALL of the provided values against the given field (AND)
|
IDocumentQuery<T> |
containsAny(java.lang.String fieldName,
java.util.Collection<java.lang.Object> values)
Performs a query matching ANY of the provided values against the given field (OR)
|
IDocumentQuery<T> |
distinct() |
IDocumentQuery<T> |
fuzzy(java.lang.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
|
java.lang.String |
getIndexQueried()
Get the name of the index being queried
|
Tuple<java.lang.String,java.lang.String> |
getLastEqualityTerm()
The last term that we asked the query to use equals on
|
java.util.Collection<java.lang.String> |
getProjectionFields()
Gets the fields for projection
|
IDocumentQuery<T> |
highlight(java.lang.String fieldName,
int fragmentLength,
int fragmentCount,
Reference<FieldHighlightings> highlightings)
Adds matches highlighting for the specified field.
|
IDocumentQuery<T> |
highlight(java.lang.String fieldName,
int fragmentLength,
int fragmentCount,
java.lang.String fragmentsField)
Adds matches highlighting for the specified field.
|
IDocumentQuery<T> |
include(java.lang.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(java.lang.String path)
Includes the specified path in the query, loading the document specified in that path
|
IDocumentQuery<T> |
intersect() |
java.util.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(java.lang.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(java.lang.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(java.lang.String fieldName,
java.lang.String searchTerms)
Perform a search for documents which fields that match the searchTerms.
|
IDocumentQuery<T> |
search(java.lang.String fieldName,
java.lang.String searchTerms,
EscapeQueryOptions escapeQueryOptions)
Perform a search for documents which fields that match the searchTerms.
|
IDocumentQuery<T> |
setAllowMultipleIndexEntriesForSameDocumentToResultTransformer(boolean value) |
IDocumentQuery<T> |
setHighlighterTags(java.lang.String[] preTags,
java.lang.String[] postTags)
Sets the tags to highlight matches with.
|
IDocumentQuery<T> |
setHighlighterTags(java.lang.String preTag,
java.lang.String postTag)
Sets the tags to highlight matches with.
|
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(java.util.Date cutOff)
Instructs the query to wait for non stale results as of the cutoff date.
|
IDocumentQuery<T> |
waitForNonStaleResultsAsOf(java.util.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(java.lang.String whereClause)
Filter the results from the index using the specified where clause.
|
IDocumentQuery<T> |
whereBetween(java.lang.String fieldName,
java.lang.Object start,
java.lang.Object end)
Matches fields where the value is between the specified start and end, exclusive
|
IDocumentQuery<T> |
whereBetweenOrEqual(java.lang.String fieldName,
java.lang.Object start,
java.lang.Object end)
Matches fields where the value is between the specified start and end, inclusive
|
IDocumentQuery<T> |
whereEndsWith(java.lang.String fieldName,
java.lang.Object value)
Matches fields which ends with the specified value.
|
IDocumentQuery<T> |
whereEquals(java.lang.String fieldName,
java.lang.Object value)
Matches exact value
Defaults to NotAnalyzed
|
IDocumentQuery<T> |
whereEquals(java.lang.String fieldName,
java.lang.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(java.lang.String fieldName,
java.lang.Object value)
Matches fields where the value is greater than the specified value
|
IDocumentQuery<T> |
whereGreaterThanOrEqual(java.lang.String fieldName,
java.lang.Object value)
Matches fields where the value is greater than or equal to the specified value
|
IDocumentQuery<T> |
whereIn(java.lang.String fieldName,
java.util.Collection<?> values)
Check that the field has one of the specified value
|
IDocumentQuery<T> |
whereLessThan(java.lang.String fieldName,
java.lang.Object value)
Matches fields where the value is less than the specified value
|
IDocumentQuery<T> |
whereLessThanOrEqual(java.lang.String fieldName,
java.lang.Object value)
Matches fields where the value is less than or equal to the specified value
|
IDocumentQuery<T> |
whereStartsWith(java.lang.String fieldName,
java.lang.Object value)
Matches fields which starts with the specified value.
|
java.lang.String getIndexQueried()
DocumentConvention getDocumentConvention()
IDocumentQuery<T> waitForNonStaleResults(long waitTimeout)
waitTimeout
- The wait timeout in milisjava.util.Collection<java.lang.String> getProjectionFields()
IDocumentQuery<T> randomOrdering()
IDocumentQuery<T> randomOrdering(java.lang.String seed)
seed
- IDocumentQuery<T> addOrder(java.lang.String fieldName, boolean descending)
fieldName
- Name of the field.descending
- If set to true [descending]IDocumentQuery<T> addOrder(java.lang.String fieldName, boolean descending, java.lang.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(java.lang.String path)
path
- IDocumentQuery<T> include(java.lang.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(java.lang.String whereClause)
whereClause
- The where clause.IDocumentQuery<T> whereEquals(java.lang.String fieldName, java.lang.Object value)
fieldName
- value
- IDocumentQuery<T> whereEquals(java.lang.String fieldName, java.lang.Object value, boolean isAnalyzed)
fieldName
- value
- isAnalyzed
- IDocumentQuery<T> openSubclause()
IDocumentQuery<T> closeSubclause()
IDocumentQuery<T> whereEquals(WhereParams whereParams)
whereParams
- void negateNext()
IDocumentQuery<T> whereIn(java.lang.String fieldName, java.util.Collection<?> values)
fieldName
- values
- IDocumentQuery<T> whereStartsWith(java.lang.String fieldName, java.lang.Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereEndsWith(java.lang.String fieldName, java.lang.Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereBetween(java.lang.String fieldName, java.lang.Object start, java.lang.Object end)
fieldName
- Name of the field.start
- The start.end
- The end.IDocumentQuery<T> whereBetweenOrEqual(java.lang.String fieldName, java.lang.Object start, java.lang.Object end)
fieldName
- Name of the field.start
- The start.end
- The end.IDocumentQuery<T> whereGreaterThan(java.lang.String fieldName, java.lang.Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereGreaterThanOrEqual(java.lang.String fieldName, java.lang.Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereLessThan(java.lang.String fieldName, java.lang.Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> whereLessThanOrEqual(java.lang.String fieldName, java.lang.Object value)
fieldName
- Name of the field.value
- The value.IDocumentQuery<T> andAlso()
IDocumentQuery<T> orElse()
IDocumentQuery<T> boost(java.lang.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(java.lang.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(java.lang.String... fields)
fields
- The fields.IDocumentQuery<T> highlight(java.lang.String fieldName, int fragmentLength, int fragmentCount, java.lang.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(java.lang.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> setHighlighterTags(java.lang.String preTag, java.lang.String postTag)
preTag
- Prefix tag.postTag
- Postfix tag.IDocumentQuery<T> setHighlighterTags(java.lang.String[] preTags, java.lang.String[] postTags)
preTags
- Prefix tags.postTags
- Postfix tags.IDocumentQuery<T> waitForNonStaleResultsAsOfNow()
IDocumentQuery<T> waitForNonStaleResultsAsOfNow(long waitTimeout)
waitTimeout
- The wait timeout.IDocumentQuery<T> waitForNonStaleResultsAsOf(java.util.Date cutOff)
cutOff
- The cut off.IDocumentQuery<T> waitForNonStaleResultsAsOf(java.util.Date cutOff, long waitTimeout)
cutOff
- The cut off.waitTimeout
- The wait timeout.IDocumentQuery<T> waitForNonStaleResults()
IDocumentQuery<T> search(java.lang.String fieldName, java.lang.String searchTerms)
fieldName
- searchTerms
- IDocumentQuery<T> search(java.lang.String fieldName, java.lang.String searchTerms, EscapeQueryOptions escapeQueryOptions)
fieldName
- searchTerms
- Tuple<java.lang.String,java.lang.String> getLastEqualityTerm()
IDocumentQuery<T> intersect()
void addRootType(java.lang.Class<T> type)
java.util.Iterator<T> iterator()
IDocumentQuery<T> distinct()
IDocumentQuery<T> containsAny(java.lang.String fieldName, java.util.Collection<java.lang.Object> values)
fieldName
- values
- IDocumentQuery<T> containsAll(java.lang.String fieldName, java.util.Collection<java.lang.Object> values)
fieldName
- values
- IDocumentQuery<T> setAllowMultipleIndexEntriesForSameDocumentToResultTransformer(boolean value)
Copyright © 2014. All Rights Reserved.