Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6351273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:58:18+00:00 2026-05-24T21:58:18+00:00

I ran a mongodump and then mongorestore to move a MongoDB database from one

  • 0

I ran a mongodump and then mongorestore to move a MongoDB database from one computer to another. The data are there, I can query them (first query) and get results but using $or in a query produces no results (second query).

db.employees.find( { 'name.first' : 'Joe' })
-- vs --
db.employees.find( { $or : [ { 'name.first' : 'Joe' }]})

As far as I can tell, indexes have been recreated from system.indexes.bson, any ideas what is wrong?

indexes:

> db.employees.getIndexes()
[
    {
        "name" : "_id_",
        "ns" : "data.demployees",
        "key" : {
            "_id" : 1
        }
    }
]
  • original server: MongoDB 1.6.5 64b
  • new server: MongoDB 1.4.4 32b

I was running the query through the console, not pymongo.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:58:19+00:00Added an answer on May 24, 2026 at 9:58 pm

    To really help here, we need a few pieces of information:

    • version numbers (MongoDB and pymongo, server and new computer)
    • output from db.employees.getIndexes()
    • can you run a test on a smaller data set? (see below)
    • can you double-check data types?

    Smaller Data Set

    Try copying out a small set of the employees to a new collection and run the same queries:

    db.employees.find().limit(100).forEach( function(x) { db.employees_test.insert(x); } )
    

    Basically, let’s try to rule out corruption of data. Then let’s try to isolate the version and see if this is a known bug.

    Double-check Data Types

    Ensure that the data types are correct.

    Is this a bug?

    This could be a bug, but if it is, the bug should be trivial to reproduce. Once you’ve double-checked that the system is behaving incorrectly, it’s time to repro this so that you can at least file a bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ran a query to copy 18 million records from one table to another.
Ran across this recently and wondering if someone out there can give me a
I ran across the following code in Ely Greenfield's SuperImage from his Book component
Ran into a strange problem in PHP today and I'm wondering if someone can
I ran: bundle install --path vendor as the first Bundler install. I then ran:
I ran some tests , and the data point that the jQuery inArray() is
Ran into some weird behaviour and wondering if anyone else can confirm what I
I ran a query against the V$SEGMENT_STATISTICS view today and got some possibly disturbing
Ran into this issue yesterday on one of our sites. First of all the
Ran into another problem using SSL and Tomcat: I've configured a keystore which contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.