Weird Searching Behavior (Parentheses Related?)

I’ve noticed recently that there seems to be an edge case that might be getting handled incorrectly when searching for a particular track in Plexamp. Specifically in cases when searching for tracks where the title is a complete match (or has a matching prefix) to the album title.

For example:

I have the following album: “Fire of Unknown Origin” by Blue Öyster Cult, which also contains a track by the same name.

  • When searching for that titular track, only the album shows up unless a complete match is found. (Note how there are no track matches)
    image
  • With a complete text match the track will show up.
    image
  • I have another track from a different album called “Fire of Unknown Origin (original version)” that doesn’t show up in the above case. But if I add an additional constraint to the search string so that the “Fire of Unknown Origin” album no longer shows up, this specific track will show up as expected (even with a partial match).
    image

Additional cases are also broken, for example:

  • Directly pasting a partial search string for the “original version” track will result in no matches at all.
    image
    Even with a more strict string.
    image
  • Adding additional characters to the above case won’t trigger any matches
    image
    …until you add the trailing parenthesis (pasting this complete search string will also yield the track as expected)
    image
  • In some cases typing a stricter search string still yields the album instead of the track that we’re expecting.
    image
  • Of course adding the closing parenthesis results in correct results like before.
    image
  • Deleting the end of the string with Backspace keeps the correct results
    image
  • This remains the case until the leading parenthesis is deleted

It seems to me that parenthesis in the search string are causing some strange behavior in the searching logic. I’m not sure if the initial query is pulled from the server and then filtered client side (this would certainly explain why pasting a search string directly has it’s own set of issues) but that seems to be the case at least.

Before anything else, try optimizing your database, and make sure it succeeds. That operation also rebuilds the full-text-search database.

It is also possible there’s a server bug, the behavior recently changed to avoid the server returning track matches for album matches (we used to return a bunch of track matches for the album which was sullying up results). So maybe in some cases that change was over-aggressive?

Optimizing the database was actually the first thing I tried since that was what you mentioned in my previous search related post: [Bug] Search Only Matches Track Artist on Exact Match

All of the behavior in this post is the same before and after running “Optimize Database” (I’ve been watching it for a few weeks). I was originally testing against server version 1.40.1.8227, but upgraded to 1.40.2.8273 after it was released to stable earlier today (after which I ran Optimize Database).

I did see some unrelated weirdness in the log while “Optimize Database” was running, but I’m fairly certain the “database schema has changed” messages are harmless according to previous forum posts.

It might be worth noting that checking the optimized database against PlexDBRepair reports that the database has become corrupt, but that could be due to the tool being slightly out of sync with the server. Prior to optimizing (via the Plex WebUI), the database was verified as good.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.