How to search query using search index with weightage in each path

Currently we use AWS open search for our searching use case, but we want to try atlas search, but I’m not sure if we can give weightage to every path we want to search on, like there is query term called ‘HAT’ and I want to search it on multiple path with different different weightage, but I’m not able to find the way to do it on atlas, as I can boost my search but that work for a whole query not for each fields. As I’m very new to Atlas Search, any one please help me out in this.

So basically we are migrating from AWS OpenSearch to Atlas Search, so we need to change our query accordingly without affecting our logic.

Hi @Hemendra_Chaudhary and welcome to MongoDB community forums!!

Based on the information share, it would be helpful if you could share more details on the expectations and requirements with examples like:

  1. A sample document from the collection.
  2. The desired output from the Atlas query.

However to begin with, the documents which are returned by Atlas search queries are assigned a score based on the relevance. I believe, the documentations on Score the Documents in the Results and How to Run Atlas Search Compound Queries with Weighted Fields would be a good starting point to learn more about scoring and weights in Atlas search.

Warm regards
Aasawari