willholley commented on a change in pull request #162: Add index selector docs
URL: 
https://github.com/apache/couchdb-documentation/pull/162#discussion_r138904286
 
 

 ##########
 File path: src/api/database/find.rst
 ##########
 @@ -1007,6 +1009,50 @@ Example index creation using all available query 
parameters
       "skip": 0
     }
 
+Creating an index with a Selector
+=================================
+
+Adding a selector to the index will add more fine grained filtering
+of what documents will be added to an index. At query time,
+the index must be specified via the use_index field for the
+query planner to use it.
+
+Example index with a selector, only documents that contain
+the `age` and `sport` fields and that match the selector will be
+added to the index.
 
 Review comment:
   I think worth mentioning that the query selector is independent from the 
indexed fields. E.g. in this example, you could have a selector on `{"type": 
"player")`, for example. This really comes into play when you want to use a 
partial index to restrict an index in a way that cannot be done at query time. 
For example, by filtering on `$ne` or `$regex`.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to