views:

31

answers:

1

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

  • Filter results by geographic lookup.
  • If keyword found in "basic comparisons" then these results should come first.
  • Then follow with results if keyword found in "full keyword search".

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

+6  A: 

You can try to use Sphinx

SeniorDev
Oh interesting, seems to do exactly what I need! Thanks :)
Julian Young