Algolia search matches for each word in a string, how to alter that?

Lets assume I have two strings “A amazing tool is Algolia” and “Algolia is a amazing tool”. Now if one search “algo” it will show both strings as results that’s totally understandable but in my case I just want to show 2nd string as it starts with that query or prioritize 2nd string and give it lower index than 1st one in results. Is there any way we can do this?