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

  • Home
  • SEARCH
  • 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 3485314
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:53:34+00:00 2026-05-18T10:53:34+00:00

Using mongodb with the NoRM driver I have this document: { _id : ObjectId(0758030341b870c019591900),

  • 0

Using mongodb with the NoRM driver I have this document:

{
    "_id" : ObjectId("0758030341b870c019591900"),
    "TmsId" : "EP000015560091",
    "RootId" : "1094362",
    "ConnectorId" : "SH000015560000",
    "SeasonId" : "7894681",
    "SeriesId" : "184298",
    "Titles" : [
            {
                    "Size" : 120,
                    "Type" : "full",
                    "Lang" : "en",
                    "Description" : "House"
            },
            {
                    "Size" : 10,
                    "Type" : "red",
                    "Lang" : "en",
                    "Description" : "House M.D."
            }
    ], yadda yadda yadda

and I am querying like:

var query = new Expando();
query["Titles.Description"] = Q.In(showNames);
var fuzzyMatches = db.GetCollection<Program>("program").Find(query).ToList();

where showNames is a string[] contain something like {“House”, “Glee”, “30 Rock”}

My results contain fuzzy matches. For example the term “House” returns every show with a Title with the word House in it ( like its doing a Contains ).

What I would like is straight matches. So if document.Titles contains “A big blue House” it does not return a match. Only if Titles.Description contains “House” would I like a match.

  • 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-18T10:53:34+00:00Added an answer on May 18, 2026 at 10:53 am

    I haven’t been able to reproduce the problem, perhaps because we’re using different versions of MongoDB and/or NoRM. However, here are some steps that may help you to find the origin of the fuzzy results.

    1. Turn on profiling, using the MongoDB shell:

      > db.setProfilingLevel(2)
      
    2. Run your code again.
    3. Set the profiling level back to 0.
    4. Review the queries that were executed:

      > db.system.profile.find()
      

    The profiling information should look something like this:

    {
      "ts" : "Wed Dec 08 2010 09:13:13 GMT+0100",
      "info" : "query test.program ntoreturn:2147483647 reslen:175 nscanned:3  \nquery: { query: { Titles.Description: { $in: [ \"House\", \"Glee\", \"30 Rock\" ] } } }  nreturned:1 bytes:159",
      "millis" : 0
    }
    

    The actual query is in the info property and should be:

    { Titles.Description: { $in: [ "House", "Glee", "30 Rock" ] } }
    

    If your query looks different, then the ‘problem’ is in the NoRM driver. For example, if NoRM translates your code to the following regex query, it will do a substring match:

    { Titles.Description: { $in: [ /House/, /Glee/, /30 Rock/ ] } }
    

    I have used NoRM myself, but I haven’t come across a setting to control this. Perhaps you’re using a different version, that does come with such functionality.

    If your query isn’t different from what it should by, try running the query from the shell. If it still comes up with fuzzy results, then we’re definitely using different versions of MongoDB 😉

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

Sidebar

Related Questions

I have been using MongoDB and the Ruby driver and Mongoid, and lines db.things.find({j:
I'm starting to learn MongoDB, using the NoRM C# driver in an ASP.NET MVC
Using MongoDB C# driver ( http://github.com/samus/mongodb-csharp ), seems that I'm unable to get the
I am using MongoDB v1.4 and the mongodb-csharp driver and I try to group
I am using the MongoDB-Csharp driver and I was wondering what the proper way
related to MongoDB Group using Ruby driver if I want to do something like
I wonder if the ruby driver for MongoDB is using the native javascript driver,
I'm using MongoDB and official C# driver 0.9 I'm just checking how embedding simple
I am using MongoDB with C# driver. I managed to add/delete/update data from collections,
Using online interfaces to a version control system is a nice way to have

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.