Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    Why is the name a problem? The MongoDB docs state that the option to assign names to indexes will be removed in the future (leaving only the auto-generated default names), so you may have to rethink this. Commented Sep 6, 2012 at 4:03
  • Take your finger off the index names. The are for very good reasons generated automatically. Commented Sep 6, 2012 at 4:22
  • Read the question again > ).hint("LongitudeLatitude_indexContents_1_Prominent_-1").limit(50).explain(); Thu Sep 06 11:01:51 uncaught exception: error: { "$err" : "bad hint", "code" : 1 0113 } How do I solve that? Commented Sep 6, 2012 at 4:44
  • That is fine. However, variable names usually must not contain -1. That's the issue. Indexes are like variable names right? Commented Sep 7, 2012 at 8:28