How to display exact match and variations after

How can I display first the exact match and search variations after?
example:

query: all star

results:
all star red (exact)
all star blue (exact)
all star long (exact)
dress all red (partial)
shoes star (partial)

I tried to use should and must but it doesn't work.
The results are mixed.

I shared a way to combine all this. Have a look at this example:

Specifically those lines.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.