{"action":"created","issue":{"url":"https://api.github.com/repos/hypothesis/h/issues/2454","labels_url":"https://api.github.com/repos/hypothesis/h/issues/2454/labels{/name}","comments_url":"https://api.github.com/repos/hypothesis/h/issues/2454/comments","events_url":"https://api.github.com/repos/hypothesis/h/issues/2454/events","html_url":"https://github.com/hypothesis/h/pull/2454","id":101714144,"number":2454,"title":"Lenient search","user":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=3","gravatar_id":"","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-18T18:00:29Z","updated_at":"2015-08-19T15:13:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hypothesis/h/pulls/2454","html_url":"https://github.com/hypothesis/h/pull/2454","diff_url":"https://github.com/hypothesis/h/pull/2454.diff","patch_url":"https://github.com/hypothesis/h/pull/2454.patch"},"body":"This is a set of three commits designed to enabled a slightly more relaxed search experience. Commit messages reproduced in chronological order:\r\n\r\ncommit f2c65f8eefff80b78bd1345a8a956f73a4b8ffce\r\nAuthor: Randall Leeds <tilgovi@hypothes.is>\r\nDate:   Fri Aug 14 15:50:02 2015 -0700\r\n\r\n    Treat the URI search match clauses as a filter\r\n    \r\n    These were being wrapped in their own boolean \"should\" so that only\r\n    one URI match was required to match, despite the other clauses being\r\n    joined under a \"must\".\r\n    \r\n    Moving these \"match\" clauses to a query filter makes it possible to be\r\n    more lenient in the future by relaxing the \"must\" clauses into a\r\n    \"should\".\r\n\r\ncommit 49dcbef846751a22cf92c1862c12030f32480260\r\nAuthor: Randall Leeds <tilgovi@hypothes.is>\r\nDate:   Fri Aug 14 15:56:14 2015 -0700\r\n\r\n    Use \"should\" instead of \"must\" for search queries\r\n    \r\n    This relaxes the search queries to be allow results that match only\r\n    some of the query. This is hopefully more intuitive for the user,\r\n    since partial matches are returned in the absence of full matches.\r\n\r\ncommit ce4751509233f5c9bda7f9f6cf50bd81a3922cb9\r\nAuthor: Randall Leeds <tilgovi@hypothes.is>\r\nDate:   Fri Aug 14 16:00:11 2015 -0700\r\n\r\n    Use a simple_query_string for search remainders\r\n    \r\n    Specifying multiple \"any\" terms in a search was resulting in only the\r\n    last term being applied, since \"multi_match\" takes a string. Instead,\r\n    change to the \"simple_query_string\" query and join the terms. This\r\n    allows multiple terms to be specified and enables the user to use\r\n    some advanced, but fairly safe, constructions."},"comment":{"url":"https://api.github.com/repos/hypothesis/h/issues/comments/132634500","html_url":"https://github.com/hypothesis/h/pull/2454#issuecomment-132634500","issue_url":"https://api.github.com/repos/hypothesis/h/issues/2454","id":132634500,"user":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=3","gravatar_id":"","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T15:13:26Z","updated_at":"2015-08-19T15:13:26Z","body":"Thanks for the review. Glad you figured it all out.\r\n\r\nThe query in the filter is because match is not a valid filter, but query let's you use any query as a filter.\r\n\r\nBoth code paths do expansion. The old one does match, uses a lot of analysis. The new one does term, uses python code to normalize.\r\n\r\nI'll review your PR first thing today. Happy to keep this until that merges."}}