Hi,

fuzzysearch is amazing. However, with a huge database containing years-old content I would like to sort the results by date. Is that possible?

Thanks!
Chris

Comments

awolfey’s picture

You can't do this now. It will have to wait for views integration, which is on my list but probably a couple months away.

designcrs’s picture

Thanks for letting me know! :-)

awolfey’s picture

You could also look at hook_fuzzysearch_score(), which lets you assign more importance to nodes based on factors of your choosing. That hook will let you boost the score of recent nodes, but it won't lest you sort them precisely.

awolfey’s picture

Status: Active » Closed (won't fix)

Some very late thoughts on this: Sorting by date alone will not give you good fuzzy results. For that you'd be better of with core search and views. I think your best bet is hook_fuzzysearch_score() for now. Marking as closed (won't fix) because I don't know how the module could really ever balance the date with the fuzzy score in a way that works for everyone.