I have never considered this question before and wondered if anyone has any recommendations or recommendations on the best methods for achieving “relevant results”.
In my case, I run a search query that includes a full text search in 5 fields, a geographic radial search and a series of basic comparisons.
I can prioritize the fields that interest me the most in this example.
When searching for keyword X
- Filter results by geographic search.
- If the keyword is found in “base comparisons,” then these results should be first.
- Then run the results if the keyword is found in the "full keyword search".
Would there be a better way to take an array of PHP results, turn it into an object, and then compare and sort before displaying?
source
share