public static class SearchOperation.Builder extends Object
Constructor and Description |
---|
Builder(BinaryValue indexName,
String queryString) |
Modifier and Type | Method and Description |
---|---|
SearchOperation |
build() |
SearchOperation.Builder |
withDefaultField(String fieldName)
Use the provided field as the default.
|
SearchOperation.Builder |
withDefaultOperation(String op)
Set the default operation.
|
SearchOperation.Builder |
withFilterQuery(String filterQuery)
Filters the search by an additional query scoped to inline fields.
|
SearchOperation.Builder |
withNumRows(int rows)
Specify the maximum number of results to return.
|
SearchOperation.Builder |
withPresort(String presort)
Sorts all of the results by bucket key, or the search score, before the given rows are chosen.
|
SearchOperation.Builder |
withReturnFields(List<String> fields)
Only return the provided fields.
|
SearchOperation.Builder |
withSortField(String fieldName)
Sort the results on the specified field name.
|
SearchOperation.Builder |
withStart(int start)
Specify the starting result of the query.
|
public Builder(BinaryValue indexName, String queryString)
public SearchOperation.Builder withNumRows(int rows)
rows
- the maximum number of results to return.public SearchOperation.Builder withStart(int start)
start
- the index of the starting result.public SearchOperation.Builder withSortField(String fieldName)
fieldName
- the fieldname to sort the results on.public SearchOperation.Builder withFilterQuery(String filterQuery)
filterQuery
- the filter query.public SearchOperation.Builder withDefaultField(String fieldName)
fieldName
- the name of the field.public SearchOperation.Builder withDefaultOperation(String op)
op
- A string containing either "and" or "or".public SearchOperation.Builder withReturnFields(List<String> fields)
fields
- a list of field names.public SearchOperation.Builder withPresort(String presort)
presort
- a String containing either "key" or "score".public SearchOperation build()
Copyright © 2016. All rights reserved.