Atlas Search highlight query matches, not content matches

Hi everyone, I stumbled on this issue, I have a search query composed of multiple should clauses:

{'index': 'default',
             'compound': 
             {'should': [
               {'text': 
                 {'query': 'artificial', 'path': 'child',
                  'fuzzy': {'maxEdits': 1, 'prefixLength': 4,
                  'maxExpansions': 512}}},
              {'text': 
                 {'query': 'intelligence', 'path': 'child',
                  'fuzzy': {'maxEdits': 1, 'prefixLength': 4,
                  'maxExpansions': 512}}},
             {'text': 
               {'query': 'articlies', 'path': 'child',
                 'fuzzy': {'maxEdits': 1, 'prefixLength': 4,
                 'maxExpansions': 512}}}]},
  'highlight': { 'path': 'child'}
}

This returns this match from the collection:

child: "articles"
highlights: Object
score: 1.408543348312378
path: "child"
texts:
Array: {value:"articles"}

Ok now I know that I matched articles, but how can I know that I matched ‘articlies’ (expecially fuzzy matches) in the original query?

Quick clarifying question: was this the only result returned?

No there were multiple matches, this was just an example.
I have a collections of entities and I was using atlas search to implement a fast fuzzy matching algorithm.
The issue is then I need to remove the matched words from the original query.

1 Like

I’m not sure I’m following the goal. Can you share more about your use case? Are you by chance looking specifically for spelling errors to correct them?