public static class SecondaryIndexQueryOperation.Query.Builder extends Object
Constructor and Description |
---|
Builder(Namespace namespace,
BinaryValue indexName)
Constructs a builder for a (2i) Query.
|
public Builder(Namespace namespace, BinaryValue indexName)
namespace
- the namespace for this QueryindexName
- the name of the index (including suffix).public SecondaryIndexQueryOperation.Query.Builder withIndexKey(BinaryValue key)
key
- the secondary index key.public SecondaryIndexQueryOperation.Query.Builder withRangeStart(BinaryValue startingIndex)
startingIndex
- the starting index for a range query.public SecondaryIndexQueryOperation.Query.Builder withRangeEnd(BinaryValue endIndex)
endIndex
- the ending index for a range query.public SecondaryIndexQueryOperation.Query.Builder withReturnKeyAndIndex(boolean returnBoth)
returnBoth
- true to return both index and object keys, false to return only object keys.public SecondaryIndexQueryOperation.Query.Builder withMaxResults(int maxResults)
maxResults
- the number of results.public SecondaryIndexQueryOperation.Query.Builder withContinuation(BinaryValue continuation)
continuation
- the continuation.public SecondaryIndexQueryOperation.Query.Builder 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 SecondaryIndexQueryOperation.Query.Builder withRegexTermFilter(BinaryValue filter)
filter
- the regex to filter terms by.public SecondaryIndexQueryOperation.Query.Builder withTimeout(int timeout)
Sets the server-side timeout value for this query.
timeout
- public SecondaryIndexQueryOperation.Query build()
Copyright © 2016. All rights reserved.