Is this possible to sort by pattern position in Mongo? E.g. lookig for school:
- school
- schoolgirl
- High school
Best regards!
Is this possible to sort by pattern position in Mongo? E.g. lookig for school:
Best regards!
I'll give you a hint.
Use indexOf to find the occurrence position
Then do conditional sort
It will sort you the way you want.
Please update the question/open new one with your attempts.