[DOCS-8848] Comment on: "manual/core/index-partial.txt" Created: 22/Sep/16  Updated: 23/Feb/18  Resolved: 15/Feb/18

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Docs Collector User (Inactive) Assignee: Jeffrey Allen
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: https://docs.mongodb.com/manual/core/index-partial/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Referrer: https://docs.mongodb.com/manual/indexes/
Screen Resolution: 2560 x 1440


Participants:
Days since reply: 5 years, 50 weeks, 5 days ago
Story Points: 0.25

 Description   

Documentation Changes

The documentation is correct as written. However, we may want to clarify WHY the second query cannot use the index to prevent future confusion like this.

Description

Are these two examples out of order? I may misunderstand how the index works.

From the page:

For example, the following query can use the index:
db.contacts.find( { name: "xyz", email:

{ $regex: /\.org$/ }

} )

However, the following query cannot use the index:
db.contacts.find( { name: "xyz", email:

{ $exists: false }

} )

I would have thought this should be the order:

For example, the following query can use the index:
db.contacts.find( { name: "xyz", email:

{ $exists: false }

} )

However, the following query cannot use the index:
db.contacts.find( { name: "xyz", email:

{ $regex: /\.org$/ }

} )



 Comments   
Comment by Githook User [ 23/Feb/18 ]

Author:

{'email': 'jeffrey.allen@10gen.com', 'name': 'jeff-allen-mongo', 'username': 'jeff-allen-mongo'}

Message: DOCS-8848 - Updating partial index example
Branch: v3.4
https://github.com/mongodb/docs/commit/32a118983e081b2dc2031b72a27e6178a77f9469

Comment by Githook User [ 23/Feb/18 ]

Author:

{'email': 'jeffrey.allen@10gen.com', 'name': 'jeff-allen-mongo', 'username': 'jeff-allen-mongo'}

Message: DOCS-8848 - Updating partial index example
Branch: master
https://github.com/mongodb/docs/commit/1741e888f4ffc626ddb0382d2aa6f2562b136c74

Comment by Jeffrey Allen [ 15/Feb/18 ]

This is RFM: https://github.com/mongodb/docs/pull/3236

Generated at Thu Feb 08 07:57:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.