Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13299

Can't create 2dsphere index

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.6
    • Component/s: Index Maintenance
    • ALL

      Hi

      I have a collection on which I want to create a 2dsphere index. When I run the following command for the first time:

      db.collection.ensureIndex(

      { "departures.location": "2dsphere", type: 1 }

      )

      I get the following error:

      {
      "err" : "missing Extra",
      "code" : 14045,
      "n" : 0,
      "lastOp" : Timestamp(1394817812, 1),
      "connectionId" : 73881,
      "ok" : 1
      }

      Then I run the same command again, and I get this error:

      {
      "err" : "getFile(): bad file number value (corrupt db?): run repair",
      "code" : 10295,
      "n" : 0,
      "lastOp" : Timestamp(1394817812, 1),
      "connectionId" : 73881,
      "ok" : 1
      }

      I run repairDatabase, and the same happens again.

      Funny thing is that I cloned the collection without the current indexes, and I can create the 2dsphere index fine in this new collection. So it has to be something related to the current indexes.

      Current indexes are:

      {
      "_id": NumberInt(1)
      }
      {
      "tags.en": 1
      }
      {
      "type": 1,
      "name_es": 1,
      "priority": -1,
      "price_adult.EUR": 1
      }
      {
      "type": 1,
      "name_en": 1,
      "priority": -1,
      "price_adult.EUR": 1
      }
      {
      "_fts": "text",
      "_ftsx": NumberInt(1)
      }
      {
      "tags.es": 1
      }
      {
      "type": 1,
      "belongs_to_destination": 1,
      "priority": -1
      }
      {
      "type": 1,
      "related_destination": 1
      }

            Assignee:
            joanna.cheng@mongodb.com Joanna Cheng
            Reporter:
            migsy Miguel G
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: