[post:508#4978]
Rebecca
04/04/2011 02:48 PM
Reviews: 23
Posts: 778
|
It's currently an ugly hand-rolled set of SQL queries. Someday I would like to look to moving to a proper search engine-- there are a lot of good options these days.
First, it splits your query into words. It does understand quotes, so for instance:
this "is a" test
Counts as three words. The quotes are not used in the search.
For each word, it does a substring match of the title and the synopsis. If it title matches, it assigns a score of 20, if the synopsis matches it assigns a score of 10. If both match, it assigns a score of 30. It then sorts all matching results by score, followed by title.
Now, you may be wondering how multiple titles fit into this. For the purposes of matching, it treats each title as if it were it's own series. So a single series may show up in the search results once for every title, if, for instance, there was a match in the synopsis.
Currently nothing else is searched, so no keywords, notables, nor reviews or links.
If we can find ways of making these results more relevant using the existing structure, I'm absolutely open to those. Things that require major changes are less likely to get the time they would need.
Edited
on 04/04/2011 02:50 PM.
|