Skip to main content

All Questions

Tagged with
1 vote
0 answers
18 views

Logical Issue in MongoDB Search Filter | NodeJS

I am working on a cab booking api. The issue i am facing on is a getAllBookings api which will be used by admin to get the history of all the bookings from booking database. Speaking of database, i ...
Faizan 's user avatar
0 votes
1 answer
125 views

Mongodb search without special characters

I have such a MongoDB collection: { ... "vin": "VDF-454s", ... } How can I get that document searching by vdf454s. In lowercase and without special characters? Thank you a lot, ...
M Kravets's user avatar
0 votes
2 answers
1k views

Mongodb index based text searches to match full string

While searching for entries in a mongodb instance using the text indexing function of mongodb, I seem to receive results which contain any of the words in the input string. So for example if I search ...
Muhammad Yahya Warraich's user avatar
1 vote
2 answers
39 views

Mongodb finding docs with specific value that also excluded a field value

I have a large collection I'm searching through on mongodb. (Supports PCRE v8.42) Let's say I'm trying to find where "comment" contains "alpha bravo" where the field value of "...
Drew Gramlich's user avatar
0 votes
1 answer
978 views

how to search for a substring in MongoDB which starts with + [duplicate]

From a mongoDB collection I wanted to search the document for which the name field has substring "+Ava"(substring starting with +). Tried it by using regex but it was giving following error: ...
Nishant Kumar's user avatar
1 vote
1 answer
29 views

MongoDB - Use field in the document as regex expression

I am storing regex expressions in MongoDB and would like to use them for queries. Documents structure: { "name": "foo", "regex_expression": "^[^@ ]+@(bar\\....
t_ad's user avatar
  • 13
0 votes
1 answer
121 views

$regex not working with URI in aggregation mongodb

i am using mongoDB atlas as a cloud database using aggregate for search result from mongoDB i am not able to use regex with URI under $match operator, so how can we use for same $match:{ "...
Apurv Chaudhary's user avatar
2 votes
1 answer
564 views

How to calculate the count of regex query results?

I have a large MongoDB collection (approx. 30M records) and each item has an array of unique numbers consisting of 8 digits. Most of the time that array has only 1 element (1 number). I want to find ...
Gevorg Melkumyan's user avatar
1 vote
1 answer
282 views

$addField by regex condition with Mongo < 4.2

I have a mongoDB collection with the following objects: { name: "a", email: "[email protected]" }, { name: "b", email: "[email protected]" }, { name: "c&...
Roni's user avatar
  • 55
-1 votes
1 answer
1k views

Remove special characters in mongo aggregate while query run

I would like to get all the datas from mongo while i need to replace special characters, but not rewrite the data while the query run: data in db: [{ number: "12/34", type: "string"...
mynameiszsofia's user avatar
-2 votes
1 answer
242 views

How to differentiate bewteen begins with and contains in mongo Atlas using regex

I want to boost my score for begins with the case. For example _ I have below two records. HCL2% CRM DETHRANAOL HCL CRM I need a score of HCL2% CRM more than DETHRANAOL HCL CRM when searching with ...
Verma's user avatar
  • 7
1 vote
0 answers
414 views

search with apostrophe string in mongo

I have a string store in the database "Slater's Deli" I want to query when users search slaters that time also that result come. Now I handle with the help of regex like if user type slater ...
Mangita's user avatar
  • 605
0 votes
1 answer
198 views

MongoDB query to find text in third level array of objects

I have a Mongo collection that contains data on saved searches in a Vue/Laravel app, and it contains records like the following: { "_id" : ObjectId("6202f3357a02e8740039f343"),...
wonder95's user avatar
  • 4,095
0 votes
1 answer
150 views

How to query Regular Expression in an Array of object and slice the result in Mongodb?

I have documents like this.. "auction_list": [ { "auction_id": 11368494, "domain": "51love.cn", "utf_name": "51love....
Irfan Habib's user avatar
1 vote
1 answer
157 views

How to match float value in mongoquery?

This is my sample documents collection of MongoDB. I need an expected result so anyone guide me to solve my problem /* 1 */ { "_id" : 1.0, "user_id" : "...
arun kumar's user avatar

15 30 50 per page
1
2 3 4 5
10