Quantcast
Channel: Active questions tagged mongodb-atlas - Stack Overflow
Viewing all articles
Browse latest Browse all 296

MongoDB Atlas Search with VectorSearch and filters

$
0
0

Take a query like this... (shortened the query for clarity)

[  {"$vectorSearch": {"index": "myVectorIndex","path": "vectors.myVectorPath","filter": {"$and": [          {"name": {"$in": ["Bill Gates"]            }          },          {"$or": [              {"field-one": true              },              {"field-two": true              }            ]          }        ]      },"queryVector": [        -0.007456403,        -0.01990008,        0.013442357,        0.060729556,        ...          ...        ...

When I use this query with Bill Gates, I get what I'm looking for. bill gates will bring zero results (lower case), Bill G will also bring zero results (partial string). The name search value must be 100% identical to what's in the database.

My goal, is to use the same query, with the queryVectors but search on name using partial case-insensitive strings so that bill or Bill Ga or bill gates finds the Bill Gate name.

How can this be achieved?


Viewing all articles
Browse latest Browse all 296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>