{"action":"created","issue":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1386","labels_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1386/labels{/name}","comments_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1386/comments","events_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1386/events","html_url":"https://github.com/Jermolene/TiddlyWiki5/pull/1386","id":54786770,"number":1386,"title":"extended search filter","user":{"login":"tobibeer","id":97566,"avatar_url":"https://avatars.githubusercontent.com/u/97566?v=3","gravatar_id":"","url":"https://api.github.com/users/tobibeer","html_url":"https://github.com/tobibeer","followers_url":"https://api.github.com/users/tobibeer/followers","following_url":"https://api.github.com/users/tobibeer/following{/other_user}","gists_url":"https://api.github.com/users/tobibeer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobibeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobibeer/subscriptions","organizations_url":"https://api.github.com/users/tobibeer/orgs","repos_url":"https://api.github.com/users/tobibeer/repos","events_url":"https://api.github.com/users/tobibeer/events{/privacy}","received_events_url":"https://api.github.com/users/tobibeer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/labels/needs-work","name":"needs-work","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-19T16:50:37Z","updated_at":"2015-01-28T12:47:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/pulls/1386","html_url":"https://github.com/Jermolene/TiddlyWiki5/pull/1386","diff_url":"https://github.com/Jermolene/TiddlyWiki5/pull/1386.diff","patch_url":"https://github.com/Jermolene/TiddlyWiki5/pull/1386.patch"},"body":"Extends search and search filter, implementing #1195. Allows...\r\n\r\n* `[search:foo:bar:title[baz]]`\r\n    * search custom fields foo & bar and title field\r\n* `[search:$custom[foo]]`\r\n    * search all custom fields\r\n* `[search:$standard[foo]]`\r\n    * search all standard fields\r\n* `[search:$text[foo]]`\r\n    * search all standard text fields — the above minus color / created / modified\r\n* `[search:$all[foo]]`\r\n    * search all fields"},"comment":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/comments/71829503","html_url":"https://github.com/Jermolene/TiddlyWiki5/pull/1386#issuecomment-71829503","issue_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1386","id":71829503,"user":{"login":"Jermolene","id":174761,"avatar_url":"https://avatars.githubusercontent.com/u/174761?v=3","gravatar_id":"","url":"https://api.github.com/users/Jermolene","html_url":"https://github.com/Jermolene","followers_url":"https://api.github.com/users/Jermolene/followers","following_url":"https://api.github.com/users/Jermolene/following{/other_user}","gists_url":"https://api.github.com/users/Jermolene/gists{/gist_id}","starred_url":"https://api.github.com/users/Jermolene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jermolene/subscriptions","organizations_url":"https://api.github.com/users/Jermolene/orgs","repos_url":"https://api.github.com/users/Jermolene/repos","events_url":"https://api.github.com/users/Jermolene/events{/privacy}","received_events_url":"https://api.github.com/users/Jermolene/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T12:47:10Z","updated_at":"2015-01-28T12:47:10Z","body":"Hi @tobibeer I've just left a couple of code comments as I was reviewing this, but as I've been looking at it in more detail I'm beginning to think that we may be better off with a slightly different approach.\r\n\r\nWe've already established a way to represent metadata about fields: using the \"tiddlerfield\" module type (see \"Register and install the built in tiddler field modules\" in boot.js). Clearly there's no provision for categorising fields into groups at the moment, but it's the obvious place for that information to go.\r\n\r\nThinking further, I'm wondering if we aren't using a sledgehammer to crack a nut here. What is the value of being able to use named categories of fields with the search filter? I can see the logic of being able to search an explicit list of fields, and to be able to search all fields. But why would one want to just search the standard fields, or just the custom fields? And perhaps those usages might be more clearly communicated by explicitly specifying the fields that should be searched?\r\n\r\nSo, my suggestion for how to proceed with this is:\r\n\r\n1. Make the definition of a standard field be one that has a tiddlerfield module\r\n2. Ensure that wiki.search uses the tiddler field metadata to correctly search all field types (eg not searching base64 data for image tiddlers). Perhaps this should be done by adding a 'search' member to \"tiddlerfield\" modules\r\n3. In #1386, drop support for $custom, $standard and $text\r\n"}}