Package com.ibm.cloud.cloudant.v1.model
Class PostPartitionExplainOptions
java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.cloud.cloudant.v1.model.PostPartitionExplainOptions
- All Implemented Interfaces:
ObjectModel
The postPartitionExplain options.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder.static interface
Whether to update the index prior to returning the result. -
Method Summary
Modifier and TypeMethodDescriptionGets the allowFallback.bookmark()
Gets the bookmark.Gets the conflicts.db()
Gets the db.Gets the executionStats.fields()
Gets the fields.limit()
Gets the limit.New builder.Gets the partitionKey.selector()
Gets the selector.skip()
Gets the skip.sort()
Gets the sort.stable()
Gets the stable.update()
Gets the update.useIndex()
Gets the useIndex.Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString
-
Method Details
-
newBuilder
New builder.- Returns:
- a PostPartitionExplainOptions builder
-
db
Gets the db. Path parameter to specify the database name.- Returns:
- the db
-
partitionKey
Gets the partitionKey. Path parameter to specify the database partition key.- Returns:
- the partitionKey
-
selector
Gets the selector. JSON object describing criteria used to select documents. The selector specifies fields in the document, and provides an expression to evaluate with the field content or other data. The selector object must: * Be structured as valid JSON. * Contain a valid query expression. Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended option if filtering on document attributes only. Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for those fields. You can create more complex selector expressions by combining operators. Operators are identified by the use of a dollar sign `$` prefix in the name field. There are two core types of operators in the selector syntax: * Combination operators: applied at the topmost level of selection. They are used to combine selectors. A combination operator takes a single argument. The argument is either another selector, or an array of selectors. * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied argument. It is important for query performance to use appropriate selectors: * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector. * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors use these operators in conjunction with equality operators or create and use a partial index to reduce the number of documents that will need to be scanned. See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available combination and conditional operators. For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).- Returns:
- the selector
-
allowFallback
Gets the allowFallback. Whether to allow fallback to other indexes. Default is true.- Returns:
- the allowFallback
-
bookmark
Gets the bookmark. Opaque bookmark token used when paginating results.- Returns:
- the bookmark
-
conflicts
Gets the conflicts. A boolean value that indicates whether or not to include information about existing conflicts in the document.- Returns:
- the conflicts
-
executionStats
Gets the executionStats. Use this option to find information about the query that was run. This information includes total key lookups, total document lookups (when `include_docs=true` is used), and total quorum document lookups (when each document replica is fetched).- Returns:
- the executionStats
-
fields
Gets the fields. JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.- Returns:
- the fields
-
limit
Gets the limit. Maximum number of results returned. The `type: text` indexes are limited to 200 results when queried.- Returns:
- the limit
-
skip
Gets the skip. Skip the first 'n' results, where 'n' is the value that is specified.- Returns:
- the skip
-
sort
Gets the sort. The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document fields. For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]` When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the same order and each object in the sort array has a single key or at least one of the sort fields is included in the selector. All sorting fields must use the same sort direction, either all ascending or all descending.- Returns:
- the sort
-
stable
Gets the stable. Whether or not the view results should be returned from a "stable" set of shards.- Returns:
- the stable
-
update
Gets the update. Whether to update the index prior to returning the result.- Returns:
- the update
-
useIndex
Gets the useIndex. Use this option to identify a specific index to answer the query, rather than letting the IBM Cloudant query planner choose an index. Specified as a two element array of design document id followed by index name, for example `["my_design_doc", "my_index"]`. It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new indexes that might get added later. If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the server responds instead with a `400` status code if the requested index is unsuitable to answer the query.- Returns:
- the useIndex
-