public abstract static class SecondaryIndexQuery.Init<S,T extends SecondaryIndexQuery.Init<S,T>> extends Object
Constructor and Description |
---|
SecondaryIndexQuery.Init(Namespace namespace,
String indexName,
S match)
Build a match query.
|
SecondaryIndexQuery.Init(Namespace namespace,
String indexName,
S start,
S end)
Build a range query.
|
Modifier and Type | Method and Description |
---|---|
protected abstract T |
self() |
T |
withContinuation(BinaryValue continuation)
Set the continuation for this query.
|
T |
withKeyAndIndex(boolean returnBoth)
Set whether to return the index keys with the Riak object keys.
|
T |
withMaxResults(Integer maxResults)
Set the maximum number of results returned by the query.
|
T |
withPaginationSort(boolean orderByKey)
Set whether to sort the results of a non-paginated 2i query.
|
T |
withRegexTermFilter(String filter)
Set the regex to filter result terms by for this query.
|
T |
withTimeout(int timeout)
Set the Riak-side timeout value.
|
public SecondaryIndexQuery.Init(Namespace namespace, String indexName, S start, S end)
Returns all objects in Riak that have an index value in the specified range.
namespace
- the namespace for this query.indexName
- the indexnamestart
- the start index valueend
- the end index valuepublic SecondaryIndexQuery.Init(Namespace namespace, String indexName, S match)
Returns all objects in Riak that have an index value matching the one supplied.
namespace
- the namespace for this queryindexName
- the index namematch
- the index value.protected abstract T self()
public T withContinuation(BinaryValue continuation)
The continuation is returned by a previous paginated query.
continuation
- public T withMaxResults(Integer maxResults)
maxResults
- the number of results.public T withKeyAndIndex(boolean returnBoth)
returnBoth
- true to return both index and object keys, false to return only object keys.public T withPaginationSort(boolean orderByKey)
Setting this to true will sort the results in Riak before returning them.
Note that this is not recommended for queries that could return a large result set; the overhead in Riak is substantial.
orderByKey
- true to sort the results, false to return as-is.public T withRegexTermFilter(String filter)
filter
- the regex to filter terms by.public T withTimeout(int timeout)
By default, riak has a 60s timeout for operations. Setting this value will override that default for both the fetch and store operation.
timeout
- the timeout in millisecondsCopyright © 2014. All rights reserved.