Atlas search get maximum should score instead of combined should score

Is there a way to get the maximum score for compound should clauses instead of the combined score?

Say I have the query:

{
    compound: {
        should: [
            {
                text: {
                    path: 'i18.en.name', // Score = 10
                    query: 'amsterdam'
                }
            },
            {
                text: {
                    path: 'i18.fr.name', // Score = 8
                    query: 'amsterdam'
                }
            },
            {
                text: {
                    path: 'i18.es.name', // Score = 6
                    query: 'amsterdam'
                }
            },
        ],
        minimumShouldMatch: 1,
        score: ?,
    }
}

Say it has a match in all 3 languages and gives me a score of 24, I only want the score for the match with the highest score (10). So if the i18n.en.name has the highest match score with multiple matches, it would give me the same score if it only had a match for i18n.en.name and no others.

In elasticsearch you can use dis_max for this, is there a way to do this in atlas search?

Thanks!

Hello @Ruud_van_Buul, and a warm welcome to the MongoDB Community forums!!

In order to understand the scenario better, could you please help me with a few details in relation to the above concerns:

  1. A sample data which will help me reproduce in my local environment.
  2. Based on the query posted what is the response that you are seeing and how is that different from the expected response?

Warm Regards,
Aasawari