[eluser]sqwk[/eluser]
I have a search function that pulls data from a database, with quite a few WHERE clauses already. However, I would like to show the user close matches as well, meaning results that don't meet all the conditions, but only a set of core-conditions and as many of the others as possible, sorted by how many are met.
Does it make sense to get the result-set that meets all of the core-conditions and do the rest of the filtering through php—manipulating a possibly very large dataset—or is there a way to do this natively through the query?