[DOCS-4525] Clarify capabilities of compound indexes with a text index Created: 15/Dec/14  Updated: 10/Jan/15  Resolved: 10/Jan/15

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.16, mongodb-2.6, mongodb-3.0

Type: Improvement Priority: Minor - P4
Reporter: William Berkeley Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-16550 Text indexes should be able to provid... Backlog
Participants:
Days since reply: 9 years, 5 weeks, 5 days ago

 Description   

Inspired by https://groups.google.com/forum/#!topic/mongodb-user/zSRygrd5GP0, I'd like to add more detail to http://docs.mongodb.org/manual/core/index-text/#compound-index to include a warning that a text index with following index keys, like

{ "t" : "text", "a" : 1 }

does not provide the ability to sort on the following field using the compound index. For example, the following query uses the text index but is scanAndOrder = true

db.test.find({ "$text" : { "$search" : "cookies" } }).sort({ "a" : 1 })

The only indexed sort available is on strength of text match. I've seen a couple of questions where people express surprise at this limitation so I think it'd be nice to document it.



 Comments   
Comment by Githook User [ 10/Jan/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-4525 text index sort order
Branch: master
https://github.com/mongodb/docs/commit/7883c51560ac9232c0c0dc732d8c760326585486

Comment by Githook User [ 10/Jan/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-4525 text index sort order
Branch: v2.6
https://github.com/mongodb/docs/commit/241b1e3aeec8c857960ed6fd19c110478af7b476

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