Trying to understand how FTS works in respect to prioritizing results, I
had a look at the library.db.
https://github.com/Logitech/slimserver/blob/ce5feac2b2c0b43966c725f38eb86d3988061e9f/Slim/Plugin/FullTextSearch/Plugin.pm#L316
I'd have to read those links in there again to fully understand what I
did :-).
Basically w10 has highest weight, w1 lowest. The overall weight is
calculated by adding the different weighed values. Eg. w10 has a weight
of 10'000, w1 a weight of 1. Which means that if a keyword is found in
w10, it's higher prioritized than when it's found in one of the other
columns (there are w5 and w3, too).
What is being stored in those various columns depends on the type of
record. Eg. title/name would always be in w10, w5 would be the year of
the album/track etc. See pretty much at the top of that file. For albums
you'd get the individual tracks' names in w1, allowing to find an album
by a track title etc.
Do I assume correctly that if w10 only has one or less hits in a search
(only then!) w1 kicks in, providing more results by widening the
search?
It's not either or, but the sum of the individual weights. If there's a
hit on w10, then it's pretty difficult for any of the other columns to
compensate, as w10 gets weighed heavily.
--
Michael
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins