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

Indexing on field causes no results from query

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.0
    • Affects Version/s: 0.9.10
    • Component/s: Querying
    • None
    • Environment:
      Windows XP 32-bit
      Intel Core2 6400 2.13GHz
      2 GB RAM

      Start the server with the attached database.

      Run the following in the Mongo Console:

      > db.properties.find({ '46' :

      { $gt : 10 }

      })

      You should get one result.

      > db.properties.ensureIndex(

      { '46' : 1}

      )
      true
      > db.properties.find({ '46' :

      { $gt : 10 }

      })

      You should get zero results.

      > db.properties.dropIndex(

      { '46' : 1}

      )

      {"nIndexesWas" : 2 , "ok" : 1}

      > db.properties.find({ '46' :

      { $gt : 10 }

      })

      You should get one result again.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            apwd cthomas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: