stashapp / stash-box

Stash App's own OpenSource video indexing and Perceptual Hashing MetaData API
MIT License
225 stars 64 forks source link

Search should replace separators with space rather than just removing #30

Open ghost opened 4 years ago

ghost commented 4 years ago

If a search string contains e.g. ham/bacon this will end up as hambacon, which makes a match unlikely. Separators like comma, dash, slash, should be replaced with space instead.

AdultSun commented 1 year ago

Was just discussing on Discord, the global search page still has issues with some of these characters.

  1. Searching for ham/bacon does not escape the / character and results in a blank and broken webpage. The only workaround is to manually escape it by searching for ham%2Fbacon instead. Most users would not know to do this or would realize why the search bar suddenly disappeared.
  2. Searching with hyphens for a scene title is broken. For example, say I want to find a scene titled Foo-Bar. Searching with the keywords Foo-Bar or Foo Bar would not match the scene title, but somehow searching FooBar instead would work. This workaround is not at all obvious either.
  3. Keyword normalization does not appear to be applied to all fields equally. For example, the performer Effy End has both Sasha X-Ray and Sasha Xray as aliases on StashDB. Searching for Sasha X-Ray or Sasha Xray only returns scenes with that one particular spelling as the scene alias and not the other. If search is going to ignore separators in titles, it should behave consistently across all other fields as well.
Flashy78 commented 1 year ago

711 enables searching scene titles with hyphens.