|
44 | 44 | :<json string|array use_index: Instruct a query to use a specific index. |
45 | 45 | Specified either as ``"<design_document>"`` or |
46 | 46 | ``["<design_document>", "<index_name>"]``. *Optional* |
| 47 | + :<json boolean conflicts: Include conflicted documents if ``true``. |
| 48 | + Intended use is to easily find conflicted documents, without an |
| 49 | + index or view. Default is ``false``. *Optional* |
47 | 50 | :<json number r: Read quorum needed for the result. This defaults to 1, in |
48 | 51 | which case the document found in the index is returned. If set to a |
49 | 52 | higher value, each document is read from at least that many replicas |
@@ -648,10 +651,18 @@ Condition operators are specific to a field, and are used to evaluate the value |
648 | 651 | stored in that field. For instance, the basic `$eq` operator matches when the |
649 | 652 | specified field contains a value that is equal to the supplied argument. |
650 | 653 |
|
651 | | -The basic equality and inequality operators common to most programming languages |
652 | | -are supported. In addition, some 'meta' condition operators are available. Some |
653 | | -condition operators accept any valid JSON content as the argument. |
654 | | -Other condition operators require the argument to be in a specific JSON format. |
| 654 | +.. note:: |
| 655 | + For a condition operator to function correctly, the field **must exist** |
| 656 | + in the document for the selector to match. As an example, ``$ne`` means |
| 657 | + the specified field must exist, and is not equal to the value of the |
| 658 | + argument. |
| 659 | + |
| 660 | +The basic equality and inequality operators common to most programming |
| 661 | +languages are supported. Strict type matching is used. |
| 662 | + |
| 663 | +In addition, some 'meta' condition operators are available. Some condition |
| 664 | +operators accept any valid JSON content as the argument. Other condition |
| 665 | +operators require the argument to be in a specific JSON format. |
655 | 666 |
|
656 | 667 | +---------------+-------------+------------+-----------------------------------+ |
657 | 668 | | Operator type | Operator | Argument | Purpose | |
@@ -1141,6 +1152,14 @@ but including it makes the intent of the selector clearer and will make |
1141 | 1152 | it easier to take advantage of future improvements to query planning |
1142 | 1153 | (e.g. automatic selection of partial indexes). |
1143 | 1154 |
|
| 1155 | +.. note:: |
| 1156 | + An index with fields is only used, when the selector includes |
| 1157 | + all of the fields indexed. For instance, if an index contains ``["a". "b"]`` |
| 1158 | + but the selector only requires field ``["a"]`` to exist in the matching |
| 1159 | + documents, the index would not be valid for the query. All indexes, |
| 1160 | + however, can be treated as if they include the special fields ``_id`` and |
| 1161 | + ``_rev``. They **never** need to be specified in the query selector. |
| 1162 | + |
1144 | 1163 | .. _api/db/find/index-get: |
1145 | 1164 |
|
1146 | 1165 | .. http:get:: /{db}/_index |
|
0 commit comments