Mongodb 2.6 index error - “key too large to index”

79 views
Skip to first unread message

Erkan Örmeci

unread,
Sep 8, 2015, 3:08:55 AM9/8/15
to mongodb-user

We’ve started to use Mongodb version 2.6. When we try to create a text index, we have been facing an error occur which is “key too large to index”.

We did some search and we found: “Starting from version 2.6, MongoDB will not create an index if the value of existing index field exceeds the index key limit.” (http://www.tutorialspoint.com/mongodb/mongodb_indexing_limitations.htm)

We need to create an index on the textual content of every web page in a web site. How can we create text index with Mongodb version 2.6? Should we go back the previous version?

Tim Hawkins

unread,
Sep 8, 2015, 8:16:36 AM9/8/15
to mongodb-user

Note, your previous version was not doing it either, it was just not telling you about it. When you say you are creating a text index, do you mean you are creating a normal index on a text field or are you using the specialised text indexing system built into 2.6+.  I belive in 2.6 you need to enable it, in 3.0 is on by default.


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/7f5dc691-8bc4-400c-a76d-c93054948e60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages