How are results from Companies Search Sorted

I’m confused by the order in which the companies search API returns its results.

I’m calling https://api.companieshouse.gov.uk/search/companies?items_per_page=200&start_index=1&q=arg

If I set arg to “TESCO” the first hit is TESCO PLC : 00445790
If I set it to "TESCO " the first hit remains TESCO PLC : 00445790
If I set it to “TESCO P” the first hit becomes TESCO PASSAIC (GP) LIMITED : 07120496 and what was originally the first hit now appears at index 78 in the results.

It seems to me that making the search argument more specific is decreasing the accuracy of the results.

Is the sort order defined in the documentation anywhere, or could you explain why I get these seemingly strange results?

Thanks in advance

Dave