Questions tagged [mongodb-atlas-search]

MongoDB Atlas Search is a cloud product based on Apache Lucene which allows relevance based search for MongoDB Atlas users.

131 questions
1
vote
1 answer

Atlas Search by regex

What is the best way to do full text search using Atlas? For example, I put mike@ and I want to see da.mike@gmail.com mike@gmail.com ... But not something like mikke@... mmike@..., such a result can show a search using autocomplete. As I understood,…
1
vote
2 answers

Mongodb atlas search: which analyzer is the best for searching multiple terms with AND condition

I'm trying to build MongoDB Atlas full text search index. However, I'm struggle a bit with the analyzers. Here is my index: { "analyzer": "lucene.standard", "searchAnalyzer": "lucene.standard", "mappings": { "dynamic": false, "fields":…
Okroshiashvili
  • 3,677
  • 2
  • 26
  • 40
1
vote
0 answers

Word boundaries in Atlas Search regex operator

I use the regex operator in my MongoDB Atlas search because the data is indexed using a keyword analyzer, meaning that the whole string of a field is indexed as one single "word". Because of this, exact word matches don't work like they would with…
1
vote
1 answer

Implementing Mongo Atlas Search on a Document that has dynamic properties

I am having trouble implementing an Atlas Search on a document collection where the documents have no fixed field names. All the field names are highly dynamic. For Example, A user may create a document with the following fields { name: string, …
BadPiggie
  • 5,471
  • 1
  • 14
  • 28
1
vote
1 answer

How can I make Atlas search look for a keyword only once?

Let's say I have 2 documents in my MongoDB database: Document 1: title: "elephant is an elephant" description: "this elephant is an elephant" Document 2: title: "duck" description: "duck is not an elephant" How can I make Atlas search give both…
1
vote
2 answers

How to perform search query with mongo and mongoose with react.js?

I've been having trouble with creating a search component in this project. Basically, the idea is that the search query will take in a name and the search will filter the database finding products that coincide with or are like name. Ultimately,…
1
vote
1 answer

MongoDB Atlas search autocomplete for partial and exact matching

Documents {'name': 'name whatever'}, {'name': 'foo whatever'}, ... Search index { "mappings": { "dynamic": false, "fields": { "name": [ { "type": "string" }, { "maxGrams": 100, …
Lion.k
  • 2,519
  • 8
  • 28
  • 43
1
vote
2 answers

Some documents not appear in atlas-search when query by few letters

I have a collection. The document structure is, { model: { name: 'string name' } } I have enabled atlas search, Also created a search index for model.name field. Search works fine, But the only issue is couldn't get results for very minimal…
BadPiggie
  • 5,471
  • 1
  • 14
  • 28
1
vote
1 answer

Mongo Atlas Search index in Docker

I already have a Docker Mongo image in my NodeJs service. I implement the acceptance test using the Docker Mongo image. But now, I start to use Atlas Search as well and I want to create Atlas Search index on my Mongo Docker. I did search on the…
sbb
  • 529
  • 3
  • 25
1
vote
1 answer

Get a list of unique values from MongoDB Atlas Search before match filters are applied

I use MongoDB Atlas Search to search through a list of resources in my database (I'm using Mongoose, hence the slightly different syntax): const allApprovedSearchResults = await Resource.aggregate([{ $search: { compound: { …
1
vote
1 answer

How to query $nin array of objectId in mongodb atlas search

I want to filter out not in array documents using atlas search(like $nin operation on an array of objectId). Adding where cause slows down my query. Can someone suggest to me how to do it? My query is as below. aggregate( [ { …
1
vote
1 answer

How to use Atlas Search to find a text containing a subtext

I have a collection hosted on Atlas, I currently have declared an Atlas Search index with the default configuration, but I am unable to use it to find documents that partially matches the text. For instance, I have the following documents : [ …
1
vote
2 answers

MongoDB Atlas Search - How to filter search score

Is there is any fine way to filter result on the basis of searchScore. For eg, I got 15000 results and I want to filter out result by using $match by keeping results with score greater than 15. Problem is that as the number of results increase…
1
vote
0 answers

Search on two number fields in Atlas Search

I have mongo document like this: { "pw" : [ { "id" : 123, "qty" : 10 }, { "id" : 456, "qty" : 15 } ] } Id and qty is Number type in Atlas Search. I want to search like "id = 123" and qty > 5. I USED EQUALS and…
1
vote
1 answer

Atlas search on an ObjectId field doesn't work

I was trying to implement an Atlas search query on an ObjectId field but nothing is being matched. Here's the index definition. { "mappings": { "dynamic": false, "fields": { "hscode": { "foldDiacritics": true, …
Ajk
  • 21
  • 3
1 2
3
8 9