-
-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add search string parsing #1982
Conversation
Huge! Perhaps a replacement for search by hash is creating a new path for scenes, like scene/hash/{HASH}/. That way if you want a specific scene by hash, you can still locate it in the UI - or just get rid of it. I can't think of a usecase for finding a specific oshash in your library |
Mostly maintenance tasks. Finding a scene from it's preview file for example. The old scene duplicate finder plugin also output the hashes. We can already filter on checksum and hash, so it would still be possible, just a little more onerous. |
Did some testing. Wow, search is useful now. Failing tests:
PASS:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a quick glance, this seems like solid work.
From a quick test everything seems to work fine. @kermieisinthehouse 1 and 3 from your failing work fine with me so it must be performance related as you suspect |
I would think that there would be an issue when someone goes to search for something with the |
I haven't been able to reproduce this, even with my contrived generated database. |
Update: After using for a week i dont think i have noticed anything wrong or a performance related issue. The only thing missing i guess is the help/instructions section |
Woo!! Thanks everyone for the great work! I'm glad my bounty has gone to good use :) |
Resolves #1210
Changes the query string parsing behaviour to the following:
foo bar
, the results must include bothfoo
andbar
. Previously, the results would include eitherfoo
orbar
.or
(case-insenstive) can be used to allow for either terms. For example:foo or bar
would return results withfoo
orbar
, like the previous behaviour.-
prefix can be added to exclude terms. For example:foo -bar
would return results withfoo
and exclude any results withbar
.Phrase parsing is unchanged and can be used in combination with the or and not modifiers. Quotes can also be used to escape the
or
and-
keywords.The
or
keyword cannot be used directly in combination with the-
symbol. What this means is that the search-foo or bar
will return results with-foo
orbar
- it does not excludefoo
or includebar
.or
sets are anded together. This means thatfoo or bar baz or qux
will return results that must include one offoo
andbar
, and one ofbaz
andqux
.This hasn't been performance tuned yet. We should also consider reducing the columns on which these queries are run, since they may cause unexpected results. For example, string queries on scenes uses
title
,details
,path
,oshash
,checksum
and (weirdly)scene_marker.title
. The first three make sense, the next two have some limited utility and have been convenient for me personally in the past, and I don't think scene markers belong there at all.The other remaining task is documentation. The browsing page in general probably needs a manual page. I also considered a mouseover tooltip that documents the query syntax, but I felt this might be overly obtrusive.