[SERVER-85840] Atlas search producing incorrect highlights Created: 28/Jan/24  Updated: 05/Feb/24  Resolved: 05/Feb/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sean Rawson Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

Steps to reproduce can be found in this community forum post:

https://www.mongodb.com/community/forums/t/unusual-highlight-results-from-compound-query-using-filter-should-and-autocomplete/261929

Participants:

 Description   

I'm using Atlas full text search to query a collection and highlight search matches. The search is executed against a search index using an aggregation pipeline with a compound filter/should query.

There seems to be "cross-pollination", for lack of a better term, between the filter and should stages. It's causing matches between the filter text and the values at the 'should' paths to show up as highlights. I wouldn't expect this, as in my case the filter path and should paths are disjoint sets.

It's a little convoluted to explain, but the forum post below has an example that I think will make it clearer.



 Comments   
Comment by Eric Sedor [ 05/Feb/24 ]

Hi seancc8@gmail.com,

We use this SERVER project for bugs in the MongoDB database server itself. To inform our Atlas team of issues you are having or feature requests you'd like to suggest, please reach out to the Atlas support team via Intercom. You can do this by clicking the round green button at the bottom right of the cluster view page in Atlas.

Thank you,
Eric

Generated at Thu Feb 08 06:58:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.