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 6879897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:54:18+00:00 2026-05-27T04:54:18+00:00

{ _id: ObjectId(4ed8d496c605da94400001e4), status: 1, user: { uid: 1 }, nid: 10582, form: {

  • 0
{
   "_id": ObjectId("4ed8d496c605da94400001e4"),
   "status": 1,
   "user": {
     "uid": 1 
  },
   "nid": 10582,
   "form": {
     "your-name": "Bob Smith",
     "description": "",
     "photo": "",
     "address": "123 Turk Hill Rd",
     "city": "",
     "zip": "14450" 
  },
   "location": {
     "address": "123 Turk Hill Rd",
     "city": "",
     "zip": "14450",
     "geo_lat": 43.0329181,
     "geo_lng": -77.4391148,
     "address_confirmed": "123 Turk Hill Rd, Victor, NY 14564, USA",
     "address_status": 200,
     "accuracy": 8 
  },
   "keywords": {
     "0": "bob",
     "1": "smith",
     "2": "",
     "4": "123",
     "5": "turk",
     "6": "hill",
     "7": "rd",
     "9": "14450" 
  },
   "time": ISODate("2011-12-02T13: 37: 26.0Z") 

Search:

{
    nid: 10582,
    keywords: {"$in": ['turk']}             
}

Results: none!

What am I doing wrong?

  • 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-27T04:54:18+00:00Added an answer on May 27, 2026 at 4:54 am

    Answer is simple: because of keywords is not an array. To search on keywords you need to change document structure as follow:

    {
    ...
    "keywords": [
         "bob",
         "smith",
         "123",
         "turk",
         "hill",
         "rd",
         "14450" 
      ],
    ...
    }
    

    It usually happens when you from driver serialize dictionary. In current moment there is no way to search in such structure. Simple use arrays instead of dictionaries. Or you can convert dictionary to array before serialize document and viсe versa when deserialize document.

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

Sidebar

Related Questions

Here are the objects: courses { name : Biology, _id : ObjectId(4b0552b0f0da7d1eb6f126a1) } students
{ _id : ObjectId(4c2209f9f3924d31102bd84a), name : mongo } what exactly is the purpose of
I have many records with below structure saved in mongodb. case class User(_id:ObjectId =
db.tasks.find({user:saturngod}); is return { _id : ObjectId(4de20ef97065cc77c80541fd), todo : [ { id : 1,
> db.users.findOne(); { _id : ObjectId(4db8ebb4c693ec0363000001), fb : { name : { last :
I have a collection: { _id - ObjectId name - string location - string
Consider the following example of mongo collection: {_id : ObjectId(4f304818884672067f000001), hash : {call_id :
I have a strings like: { _id : ObjectId( 4ebb9544e4b097b7e6617e1c ), _class : I
I have a document which includes a subdocument: { _id : ObjectId(XXXXX), SearchKey :
I have this document stored in mongodb document: { _id:ObjectId(4eb7642ba899edcc31000001) hash:abcd123 value:some_text_here } I

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.