{"action":"created","issue":{"url":"https://api.github.com/repos/mserajnik/hydrusrv/issues/17","repository_url":"https://api.github.com/repos/mserajnik/hydrusrv","labels_url":"https://api.github.com/repos/mserajnik/hydrusrv/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/mserajnik/hydrusrv/issues/17/comments","events_url":"https://api.github.com/repos/mserajnik/hydrusrv/issues/17/events","html_url":"https://github.com/mserajnik/hydrusrv/issues/17","id":390333580,"node_id":"MDU6SXNzdWUzOTAzMzM1ODA=","number":17,"title":"Add wildcard tag searches","user":{"login":"mserajnik","id":28833155,"node_id":"MDQ6VXNlcjI4ODMzMTU1","avatar_url":"https://avatars3.githubusercontent.com/u/28833155?v=4","gravatar_id":"","url":"https://api.github.com/users/mserajnik","html_url":"https://github.com/mserajnik","followers_url":"https://api.github.com/users/mserajnik/followers","following_url":"https://api.github.com/users/mserajnik/following{/other_user}","gists_url":"https://api.github.com/users/mserajnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mserajnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mserajnik/subscriptions","organizations_url":"https://api.github.com/users/mserajnik/orgs","repos_url":"https://api.github.com/users/mserajnik/repos","events_url":"https://api.github.com/users/mserajnik/events{/privacy}","received_events_url":"https://api.github.com/users/mserajnik/received_events","type":"User","site_admin":false},"labels":[{"id":916076324,"node_id":"MDU6TGFiZWw5MTYwNzYzMjQ=","url":"https://api.github.com/repos/mserajnik/hydrusrv/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":{"login":"mserajnik","id":28833155,"node_id":"MDQ6VXNlcjI4ODMzMTU1","avatar_url":"https://avatars3.githubusercontent.com/u/28833155?v=4","gravatar_id":"","url":"https://api.github.com/users/mserajnik","html_url":"https://github.com/mserajnik","followers_url":"https://api.github.com/users/mserajnik/followers","following_url":"https://api.github.com/users/mserajnik/following{/other_user}","gists_url":"https://api.github.com/users/mserajnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mserajnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mserajnik/subscriptions","organizations_url":"https://api.github.com/users/mserajnik/orgs","repos_url":"https://api.github.com/users/mserajnik/repos","events_url":"https://api.github.com/users/mserajnik/events{/privacy}","received_events_url":"https://api.github.com/users/mserajnik/received_events","type":"User","site_admin":false},"assignees":[{"login":"mserajnik","id":28833155,"node_id":"MDQ6VXNlcjI4ODMzMTU1","avatar_url":"https://avatars3.githubusercontent.com/u/28833155?v=4","gravatar_id":"","url":"https://api.github.com/users/mserajnik","html_url":"https://github.com/mserajnik","followers_url":"https://api.github.com/users/mserajnik/followers","following_url":"https://api.github.com/users/mserajnik/following{/other_user}","gists_url":"https://api.github.com/users/mserajnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mserajnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mserajnik/subscriptions","organizations_url":"https://api.github.com/users/mserajnik/orgs","repos_url":"https://api.github.com/users/mserajnik/repos","events_url":"https://api.github.com/users/mserajnik/events{/privacy}","received_events_url":"https://api.github.com/users/mserajnik/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-12-12T17:35:47Z","updated_at":"2018-12-13T11:35:31Z","closed_at":null,"author_association":"OWNER","body":"# Wildcard tag searches\r\n\r\n## Outline\r\n\r\nIt should be possible to search for files via \"wildcarded\" tags, e.g. `creator:*` or `*hair`.\r\n\r\n`*` is the wildcard marker. An unlimited number of wildcarded tags can be provided. A maximum of two markers can be used for each tag and they must always be at the beginning and/or the end of the string. Additionally provided ones will be stripped if at the beginning or end (e.g., `creator:** -> creator:*`) and taken literally if in the middle of the string (e.g., `blue*hair` will search for exactly that tag, without considering `*` to be a wildcard marker).\r\n\r\nAlso, searches for the marker alone (`*`) should just return all files that have _any_ tags by a simple `NOT NULL` comparison on `files.tags_id`. Extra care must be taken to not overlook this special case, as it will negatively impact performance _a lot_ if handled like a regular wildcard tag.\r\n\r\nWildcard tag searches should work in combination with the already existing tags and exclude tags search and also the _system constraints_ mentioned in #16.\r\n\r\n## API\r\n\r\nThe `tags[]` query parameter can be reused, just like with exclude tags:\r\n\r\n```tags[]=partial%2A```\r\n\r\nor\r\n\r\n```tags[]=%2Apartial%2A```\r\n\r\n`%2A` is `*` in encoded form. In reality, `[` and `]` need to be encoded as well, but I left that out to make it easier to read here.\r\n\r\nPrefixing the wildcard marker with `\\` (e.g., `creator:\\*`) will search for the character literally (so, `creator:*`, using the same example) instead of starting a wildcard search. As with excluded tags, this prefix is only necessary if the user wants to escape the `*` at the beginning or end of the string, not when it's somewhere in the middle (in which case the `*` will be taken literally and not considered a marker automatically, as mentioned in the outline).\r\n\r\n## Frontend\r\n\r\nIn hydrusrvue, this is best handled just like exclude tags (but maybe stop the autocomplete showing suggestions once the wildcard marker is entered).\r\n\r\n## Timeframe\r\n\r\nWork on this will be started after finishing #16, so likely at the end of January/the beginning of February. I plan to finish this by the end of February."},"comment":{"url":"https://api.github.com/repos/mserajnik/hydrusrv/issues/comments/446937624","html_url":"https://github.com/mserajnik/hydrusrv/issues/17#issuecomment-446937624","issue_url":"https://api.github.com/repos/mserajnik/hydrusrv/issues/17","id":446937624,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjkzNzYyNA==","user":{"login":"mserajnik","id":28833155,"node_id":"MDQ6VXNlcjI4ODMzMTU1","avatar_url":"https://avatars3.githubusercontent.com/u/28833155?v=4","gravatar_id":"","url":"https://api.github.com/users/mserajnik","html_url":"https://github.com/mserajnik","followers_url":"https://api.github.com/users/mserajnik/followers","following_url":"https://api.github.com/users/mserajnik/following{/other_user}","gists_url":"https://api.github.com/users/mserajnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mserajnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mserajnik/subscriptions","organizations_url":"https://api.github.com/users/mserajnik/orgs","repos_url":"https://api.github.com/users/mserajnik/repos","events_url":"https://api.github.com/users/mserajnik/events{/privacy}","received_events_url":"https://api.github.com/users/mserajnik/received_events","type":"User","site_admin":false},"created_at":"2018-12-13T11:35:31Z","updated_at":"2018-12-13T11:35:31Z","author_association":"OWNER","body":"Maybe in the frontend, not sure about it yet though. In any case, I'll explain it in the _Help_ view."}}
{"actor":{"display_login":"mserajnik"}}