{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-definitive-guide/issues/464","repository_url":"https://api.github.com/repos/elastic/elasticsearch-definitive-guide","labels_url":"https://api.github.com/repos/elastic/elasticsearch-definitive-guide/issues/464/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-definitive-guide/issues/464/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-definitive-guide/issues/464/events","html_url":"https://github.com/elastic/elasticsearch-definitive-guide/pull/464","id":126043527,"number":464,"title":"Structured Search / Filtering overhaul (WIP)","user":{"login":"polyfractal","id":1224228,"avatar_url":"https://avatars.githubusercontent.com/u/1224228?v=3","gravatar_id":"","url":"https://api.github.com/users/polyfractal","html_url":"https://github.com/polyfractal","followers_url":"https://api.github.com/users/polyfractal/followers","following_url":"https://api.github.com/users/polyfractal/following{/other_user}","gists_url":"https://api.github.com/users/polyfractal/gists{/gist_id}","starred_url":"https://api.github.com/users/polyfractal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polyfractal/subscriptions","organizations_url":"https://api.github.com/users/polyfractal/orgs","repos_url":"https://api.github.com/users/polyfractal/repos","events_url":"https://api.github.com/users/polyfractal/events{/privacy}","received_events_url":"https://api.github.com/users/polyfractal/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-11T21:43:32Z","updated_at":"2016-04-08T20:59:07Z","closed_at":"2016-04-08T20:58:18Z","pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch-definitive-guide/pulls/464","html_url":"https://github.com/elastic/elasticsearch-definitive-guide/pull/464","diff_url":"https://github.com/elastic/elasticsearch-definitive-guide/pull/464.diff","patch_url":"https://github.com/elastic/elasticsearch-definitive-guide/pull/464.patch"},"body":"WIP for overhauling the structured search chapter.  Needs a fair amount more work and polishing (as well as scanning the rest of the book for `filtered` and similar references).\r\n\r\nNo need for review now, mostly just wanted to put it up to discuss talk through some high-level stuff.\r\n\r\nDespite being a relatively small syntax change (no `filtered` query, use bool query's `filter`), it has pretty widespread impact on the language we use to describe it.  Filters are no longer a \"separate thing\" in the DSL, they are just a different type of query.  Which makes them squishy and difficult to talk about.  \r\n\r\n- I used the convention of calling them either *\"non-scoring query\"* or *\"filtering query\"* to differentiate them from *\"scoring queries\"*.  It's not great, and further overloads the term \"query\", but I don't think we can keep referring to them as distinct filters anymore.  \r\n\r\n  I tried that at first, but it was very confusing:  \"This is a query, unless it's placed in the `filter` clause of a boolean query, then it's a filter.  But they are actually just queries that don't score, despite us calling it a filter\".  Sigh :(\r\n\r\n- I beefed up the `bool` description in the DSL intro, since it's needed heavily in the structured search section\r\n\r\n- We put Structured Search before Full-Text since it was a bit simpler / self contained.  But now it's a weird mix of \"this is a non-scoring query but we haven't told you what scoring really is yet\".  I wonder if it should be moved after full-text?  Not sure about this, just a thought\r\n\r\n- In general, I tried to downplay the ~Magic of Caching~ language that I used before, since caching is more conservative now.  Similarly, in the technical description of caching I included a small comparison to how things used to be done, since we've always made such a big deal about filter caching.  I know we don't normally compare to old versions, but I thought this might be an OK exception considering the history.\r\n\r\n- Related, should I include a small blurb at the front talking about the `filtered` -> `bool` change?  I just wrote as if it's always been that way, but perhaps we want to offer some explanation?"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-definitive-guide/issues/comments/207604550","html_url":"https://github.com/elastic/elasticsearch-definitive-guide/pull/464#issuecomment-207604550","issue_url":"https://api.github.com/repos/elastic/elasticsearch-definitive-guide/issues/464","id":207604550,"user":{"login":"polyfractal","id":1224228,"avatar_url":"https://avatars.githubusercontent.com/u/1224228?v=3","gravatar_id":"","url":"https://api.github.com/users/polyfractal","html_url":"https://github.com/polyfractal","followers_url":"https://api.github.com/users/polyfractal/followers","following_url":"https://api.github.com/users/polyfractal/following{/other_user}","gists_url":"https://api.github.com/users/polyfractal/gists{/gist_id}","starred_url":"https://api.github.com/users/polyfractal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polyfractal/subscriptions","organizations_url":"https://api.github.com/users/polyfractal/orgs","repos_url":"https://api.github.com/users/polyfractal/repos","events_url":"https://api.github.com/users/polyfractal/events{/privacy}","received_events_url":"https://api.github.com/users/polyfractal/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T20:59:07Z","updated_at":"2016-04-08T20:59:07Z","body":"For posterity, we decided to get these changes to structured search in, and we'll revisit the re-organization effort a little later since that will be quite the project."}}