skip to Main Content

Search MongoDB autocomplete filtered

I want to search autocomplete on the following fields :contactfirstname, contactlastname and name Also, want to filter based on userid(s) first then perform autocomplete search Issue: Without filter criteria, autocomplete is working fine With filter criteria in compound query not…

VIEW QUESTION

mongodb query filter documents by array value or size

I have a document that's look like this if it hasn't got any items in the itemList field: { "_id":{ "$oid":"62e12a0b73a8c3469e635d93" }, "listName":"name of list", "alloweUidList":[ { "uid":"prQUKkIxljVqbHlCKah7T1Rh7l22", "role":"creator", "boolId": 1, } ], "itemList":[ ], "crDate":"2022-07-27 14:05", "modDate":"2022-07-27 14:05", "boolId":1…

VIEW QUESTION

Adding multiple fields to documents in mongodb using pymongo

I have a sample collection of documents in mongo db like below [{"name":"hans","age":30,"test":"pass","pre":"no","calc":"no"}, {"name":"abs","age":20,"test":"not_pass","pre":"yes","calc":"no"}, {"name":"cdf","age":40,"test":"pass"}, {"name":"cvf","age":30,"test":"not_pass","pre":"no","calc":"yes"}, {"name":"cdf","age":23,"test":"pass"}, {"name":"asd","age":35,"test":"not_pass"}] For some documents the fields pre and calc are not present. I want to add those two fields to the documents which…

VIEW QUESTION
Back To Top
Search