Hi @Florian_Walther,
I want to move exactly one of these sponsored entries to the top of the search results, but keep natural ordering up for the remaining ones ( no matter if sponsored or not ).
From what it sounds like here, it doesn’t really sound like a sort per se. It sounds like you are wanting to “re-arrange” the result set. Is this correct?
In saying so, could you provide the following details so I can try work out a possible method to see if the desired output can be achieved?:
- MongoDB Version.
- Search index details.
- Full
$search
stage details - 4-5 sample documents.
- The expected / desired output.
- Output from the
$search
stage whilst highlighting which document wheresponsored
:true
you wish to have moved to the top (e.g. if there are multiple documents in the result set withsponsored:true
, which one should go to the top? The highest scoring, or a random one)
Please redact any personal or sensitive information before posting it here
Regards,
Jason