phpmysqlsortingassociated-sorting

Sorting results by 'most relevent' - MYSQL & PHP


I've never really considered this question before and wondered if anyone has any advice or input on best practices for achieving 'relevent results'.

In my case I'm running a search query that includes full text searching across 5 fields, a geographic radial lookup and a number of basic comparisons.

I can prioritise the fields I'm most interested in for this example..

In looking for keyword X

Would the best route be to take the PHP result array, turn this into an object and then compare and sort before displaying?


Solution

  • You can try to use Sphinx