Describe the bug
I noticed when using the internal library search, in one very specific scenario, it wasn't showing a result for a movie with a particularly long title that was definitely a match.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The auto-suggest would show both _Dark Phoenix_ and _Harry Potter and the Order of the Phoenix_
Actual behavior
The auto-suggest only shows _Dark Phoenix_, and not _Harry Potter and the Order of the Phoenix_. Note that if you instead search _the phoenix_ - both correctly show.
Screenshots




Platform Information (please complete the following information):
Debug Logs
radarr.debug.txt
(I deleted all logs before doing the search, and from what I can tell, it looks like internal library searches don't generate log entries, but I digest :-)
Nice bug report! will check it out.
The issue is with our fuse.js settings, their docs explain it well:
location defaults to 0
distance defaults to 100
threshold defaults to 0.6
For example, consider the string "Fuse.js is a powerful, lightweight fuzzy-search library, with zero dependencies". Searching for the pattern "zero" would not match anything, even though it occurs in the string. The reason is that with the above defaults, for it to be considered a match it would have to be within 60 characters away from the expected location 0. However, "zero" appears at index 62.
If you don't care where the pattern appears in the string, and you still want to consider it a match, set ignoreLocation to true.
I really don't think we care about location of the search term in the string that much, so I'm tempted to just say lets set ignoreLocation: true. @ta264 @markus101 thoughts on this (it affects Sonarr as well). Testing it fixes the above case that OP has described.

That makes sense to me.
Thank you guys for jumping on this so quickly. FWIW - I too cannot think of a scenario where you'd want to ignore a library search match just because the match was at the end of a long name.
Agreed, I think merge ther fix you suggest @Qstick