)]}'
{"guidelines/pagination_filter_sort.rst":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"036f11d222f93e08eaa8ae43aec4b05f22d95f02","unresolved":false,"context_lines":[{"line_number":63,"context_line":"``/app/items?foo\u003dbuzz\u0026baz\u003dquux`` would provide no results."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"**TODO** Add section on more complex queries including \u0027like\u0027, regex, and"},{"line_number":66,"context_line":"ranges."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Paginating responses should be done *after* applying the filters in a query,"},{"line_number":69,"context_line":"because it\u0027s possible for the first page to contain no matches."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a016987_e57c22ed","line":66,"updated":"2015-05-15 20:17:53.000000000","message":"I\u0027m not convinced that we should consider regex or like filtering in the API as good design. It has pretty substantial performance implications.","commit_id":"1546be889951d367349d277437f5500fecd09a78"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"90169b23eaf49ff4ed7c31c3b02904b812d95478","unresolved":false,"context_lines":[{"line_number":85,"context_line":"  }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"If values contain commas, they can be quoted similar to CSV escaping. For"},{"line_number":88,"context_line":"example, a query for the value ``a,bc`` of ``d`` would be ``?f_foo\u003d\"a,bc\",d``. If"},{"line_number":89,"context_line":"values contain double-quotes, those can be backslashed inside quotes. For a"},{"line_number":90,"context_line":"value ``a\"b\"c`` the query would be ``?f_foo\u003d\"a\\\"b\\\"c\"``."},{"line_number":91,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a016987_90133cb8","line":88,"updated":"2015-05-28 18:19:55.000000000","message":"of --\u003e or","commit_id":"cb4c109f5d572b4572cf7f8122e7bfa26c7d5fc0"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"90169b23eaf49ff4ed7c31c3b02904b812d95478","unresolved":false,"context_lines":[{"line_number":92,"context_line":"For queries that need comparisons other than simple equals, operators are"},{"line_number":93,"context_line":"supported for greater-than, greater-than-or-equal, less-than, and"},{"line_number":94,"context_line":"less-than-or-equal-to. In order, the operators are: ``gt``, ``gte``, ``lt``,"},{"line_number":95,"context_line":"and ``lte``."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":98,"context_line":"example, finding objects with a size greater than 8 would be written as"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a016987_d07e54ae","line":95,"updated":"2015-05-28 18:19:55.000000000","message":"An operator that is missing here (besides the LIKE mentioned below) is the not-equal.\n\nMaybe add it as \"ne\"? For consistency you could also add \"eq\" here, which could be omitted, giving you the simplified syntax for equality you describe above.","commit_id":"cb4c109f5d572b4572cf7f8122e7bfa26c7d5fc0"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"cef8e83bef25e9b009a43df2197468adce983c8b","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":98,"context_line":"example, finding objects with a size greater than 8 would be written as"},{"line_number":99,"context_line":"``?f_size\u003dgt,9`` and would return::"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"  GET /app/items?f_size\u003dgt,8"},{"line_number":102,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a016987_00dc9771","line":99,"updated":"2015-05-28 19:32:55.000000000","message":"comma becomes overloaded here, with it already having been used for OR of a value set above.\n\nthis seems awkward and likely adds unnecessary complexity to implementations. can we choose another separator for operators?","commit_id":"5299568fc617c04d1975f82860c5f4b00d000eb1"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"1edff168e77c96a5fa42b0b08564f5b14d8a5647","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":98,"context_line":"example, finding objects with a size greater than 8 would be written as"},{"line_number":99,"context_line":"``?f_size\u003dgt,9`` and would return::"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"  GET /app/items?f_size\u003dgt,8"},{"line_number":102,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a016987_4014cf4b","line":99,"in_reply_to":"7a016987_00dc9771","updated":"2015-05-28 19:58:47.000000000","message":"Oh, right. The other alternative is to give the OR operator a name. I think an appropriate name would be \"in\", so you can do something like this:\n\n    ?f_foo\u003din,a,b,c","commit_id":"5299568fc617c04d1975f82860c5f4b00d000eb1"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"95b34baea21195fac3a414948d4b2008132f32ff","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":98,"context_line":"example, finding objects with a size greater than 8 would be written as"},{"line_number":99,"context_line":"``?f_size\u003dgt,9`` and would return::"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"  GET /app/items?f_size\u003dgt,8"},{"line_number":102,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a016987_0c3970d7","line":99,"in_reply_to":"7a016987_4014cf4b","updated":"2015-05-28 21:35:30.000000000","message":"the in, operator works for me as an alternative.","commit_id":"5299568fc617c04d1975f82860c5f4b00d000eb1"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"97aa8b91cebb6c31d2b4a383dd38dfc6fe3f0af6","unresolved":false,"context_lines":[{"line_number":87,"context_line":"If values contain commas, they can be quoted similar to CSV escaping. For"},{"line_number":88,"context_line":"example, a query for the value ``a,bc`` of ``d`` would be ``?f_foo\u003d\"a,bc\",d``."},{"line_number":89,"context_line":"If values contain double-quotes, those can be backslashed inside quotes. For a"},{"line_number":90,"context_line":"value ``a\"b\"c`` the query would be ``?f_foo\u003d\"a\\\"b\\\"c\"``."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"For queries that need comparisons other than simple equals, operators are"},{"line_number":93,"context_line":"supported for greater-than, greater-than-or-equal, less-than, and"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a016987_ece5a637","line":90,"updated":"2015-06-01 13:22:14.000000000","message":"Done.","commit_id":"6ba74116c7bc6867a5268507c7cbb055754ddf2b"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"80543e61d6385b55a0edc5d875708420eaa3ec02","unresolved":false,"context_lines":[{"line_number":87,"context_line":"If values contain commas, they can be quoted similar to CSV escaping. For"},{"line_number":88,"context_line":"example, a query for the value ``a,bc`` of ``d`` would be ``?f_foo\u003d\"a,bc\",d``."},{"line_number":89,"context_line":"If values contain double-quotes, those can be backslashed inside quotes. For a"},{"line_number":90,"context_line":"value ``a\"b\"c`` the query would be ``?f_foo\u003d\"a\\\"b\\\"c\"``."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"For queries that need comparisons other than simple equals, operators are"},{"line_number":93,"context_line":"supported for greater-than, greater-than-or-equal, less-than, and"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a016987_f57ebbe2","line":90,"updated":"2015-05-29 16:08:21.000000000","message":"this f_foo query example needs to be updated to have the \"in\" operator","commit_id":"6ba74116c7bc6867a5268507c7cbb055754ddf2b"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"6b2cc08151d4a283a524e1d77f51116734c1ee28","unresolved":false,"context_lines":[{"line_number":87,"context_line":"If values contain commas, they can be quoted similar to CSV escaping. For"},{"line_number":88,"context_line":"example, a query for the value ``a,bc`` of ``d`` would be ``?f_foo\u003d\"a,bc\",d``."},{"line_number":89,"context_line":"If values contain double-quotes, those can be backslashed inside quotes. For a"},{"line_number":90,"context_line":"value ``a\"b\"c`` the query would be ``?f_foo\u003d\"a\\\"b\\\"c\"``."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"For queries that need comparisons other than simple equals, operators are"},{"line_number":93,"context_line":"supported for greater-than, greater-than-or-equal, less-than, and"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a016987_522d9744","line":90,"in_reply_to":"7a016987_4e3299a8","updated":"2015-05-29 22:12:27.000000000","message":"The comment at end of the para had me looking at a different query, you\u0027re right that the upper example needs an \"in,\"","commit_id":"6ba74116c7bc6867a5268507c7cbb055754ddf2b"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"433f1a0068c7d02b8026d6f39bf4467cee511255","unresolved":false,"context_lines":[{"line_number":87,"context_line":"If values contain commas, they can be quoted similar to CSV escaping. For"},{"line_number":88,"context_line":"example, a query for the value ``a,bc`` of ``d`` would be ``?f_foo\u003d\"a,bc\",d``."},{"line_number":89,"context_line":"If values contain double-quotes, those can be backslashed inside quotes. For a"},{"line_number":90,"context_line":"value ``a\"b\"c`` the query would be ``?f_foo\u003d\"a\\\"b\\\"c\"``."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"For queries that need comparisons other than simple equals, operators are"},{"line_number":93,"context_line":"supported for greater-than, greater-than-or-equal, less-than, and"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a016987_4e3299a8","line":90,"in_reply_to":"7a016987_eb3b77cf","updated":"2015-05-29 18:10:16.000000000","message":"the one above has two values: ?f_foo\u003d\"a,bc\",d should be ?f_foo\u003din,\"a,bc\",d","commit_id":"6ba74116c7bc6867a5268507c7cbb055754ddf2b"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"3de272b25bcf863b3b5d28bb9cc2a7d93ce66e2a","unresolved":false,"context_lines":[{"line_number":87,"context_line":"If values contain commas, they can be quoted similar to CSV escaping. For"},{"line_number":88,"context_line":"example, a query for the value ``a,bc`` of ``d`` would be ``?f_foo\u003d\"a,bc\",d``."},{"line_number":89,"context_line":"If values contain double-quotes, those can be backslashed inside quotes. For a"},{"line_number":90,"context_line":"value ``a\"b\"c`` the query would be ``?f_foo\u003d\"a\\\"b\\\"c\"``."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"For queries that need comparisons other than simple equals, operators are"},{"line_number":93,"context_line":"supported for greater-than, greater-than-or-equal, less-than, and"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a016987_eb3b77cf","line":90,"in_reply_to":"7a016987_f57ebbe2","updated":"2015-05-29 17:29:36.000000000","message":"There are no separators here. None of these are value sets.","commit_id":"6ba74116c7bc6867a5268507c7cbb055754ddf2b"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"97aa8b91cebb6c31d2b4a383dd38dfc6fe3f0af6","unresolved":false,"context_lines":[{"line_number":92,"context_line":"For queries that need comparisons other than simple equals, operators are"},{"line_number":93,"context_line":"supported for greater-than, greater-than-or-equal, less-than, and"},{"line_number":94,"context_line":"less-than-or-equal-to. In order, the operators are: ``gt``, ``gte``, ``lt``,"},{"line_number":95,"context_line":"and ``lte``."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":98,"context_line":"example, finding objects with a size greater than 8 would be written as"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a016987_cce0aa28","line":95,"updated":"2015-06-01 13:22:14.000000000","message":"Added some clarity on searching for strings matching the operators to this paragraph.","commit_id":"6ba74116c7bc6867a5268507c7cbb055754ddf2b"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"80543e61d6385b55a0edc5d875708420eaa3ec02","unresolved":false,"context_lines":[{"line_number":92,"context_line":"For queries that need comparisons other than simple equals, operators are"},{"line_number":93,"context_line":"supported for greater-than, greater-than-or-equal, less-than, and"},{"line_number":94,"context_line":"less-than-or-equal-to. In order, the operators are: ``gt``, ``gte``, ``lt``,"},{"line_number":95,"context_line":"and ``lte``."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":98,"context_line":"example, finding objects with a size greater than 8 would be written as"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a016987_b06f31c3","line":95,"updated":"2015-05-29 16:08:21.000000000","message":"I like the operator syntax, but one case that makes it a bit confusing is when you want to filter by a string that matches one of the operator names. For example, say you want to look for all items where foo is set to the string \"gte\"\n\n    ?f_foo\u003dgte\n\nContrast that to the use of the \"gte\" operator, for example, to filter by all values of foo that are greater or equal than the string \"blah\":\n\n    ?f_foo\u003dgte,blah\n\nThe filter parser will have to be smart to detect if the \"gte\" in the example above is an operator name or a constant, based on the entire value of the query string argument.\n\nAre we okay having this ambiguity in the filter syntax?","commit_id":"6ba74116c7bc6867a5268507c7cbb055754ddf2b"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"3de272b25bcf863b3b5d28bb9cc2a7d93ce66e2a","unresolved":false,"context_lines":[{"line_number":92,"context_line":"For queries that need comparisons other than simple equals, operators are"},{"line_number":93,"context_line":"supported for greater-than, greater-than-or-equal, less-than, and"},{"line_number":94,"context_line":"less-than-or-equal-to. In order, the operators are: ``gt``, ``gte``, ``lt``,"},{"line_number":95,"context_line":"and ``lte``."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":98,"context_line":"example, finding objects with a size greater than 8 would be written as"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a016987_6832ed11","line":95,"in_reply_to":"7a016987_b06f31c3","updated":"2015-05-29 17:29:36.000000000","message":"the parser should be looking for \"gte,\" only. Finding \"gte\" is insufficient to detect an operator.  This addresses the case of \n\n?f_foo\u003dgte\n\nvs.\n\n?f_foo\u003dgte,blah\n\nas commas need to be quoted when searching for \"gte,\" as in\n\n?f_foo\u003d\"gte,\"","commit_id":"6ba74116c7bc6867a5268507c7cbb055754ddf2b"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"0aaf3806bf7d9ce0bdf2ab085382b8efc0a9bc9b","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"An existing example of filtering in"},{"line_number":23,"context_line":"`Nova \u003chttp://specs.openstack.org/openstack/neutron-specs/specs/api/networking_general_api_information.html#filtering-and-column-selection\u003e`_"},{"line_number":24,"context_line":"It is notable that Nova doesn\u0027t support have support for OR filters, requiring"},{"line_number":25,"context_line":"separate requests per query."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"A different strategy is to specify query objects and pass them as a single"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5afe65bd_23fa62be","line":24,"updated":"2015-06-02 12:59:38.000000000","message":"Indeed there was.","commit_id":"32dbcdafb170c289a3c966da70636f1c5a7b2940"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"7d03e35bad5173b346581c7bed3a79043fba381c","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"An existing example of filtering in"},{"line_number":23,"context_line":"`Nova \u003chttp://specs.openstack.org/openstack/neutron-specs/specs/api/networking_general_api_information.html#filtering-and-column-selection\u003e`_"},{"line_number":24,"context_line":"It is notable that Nova doesn\u0027t support have support for OR filters, requiring"},{"line_number":25,"context_line":"separate requests per query."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"A different strategy is to specify query objects and pass them as a single"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5afe65bd_5348a65b","line":24,"updated":"2015-06-01 22:42:40.000000000","message":"i think there is an extra \"support\" in here","commit_id":"32dbcdafb170c289a3c966da70636f1c5a7b2940"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"0aaf3806bf7d9ce0bdf2ab085382b8efc0a9bc9b","unresolved":false,"context_lines":[{"line_number":25,"context_line":"separate requests per query."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"A different strategy is to specify query objects and pass them as a single"},{"line_number":28,"context_line":"URL-encoded JSON list. This is lest client-friendly because it requires extra"},{"line_number":29,"context_line":"encoding steps."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"The simplest way to allow filtering is to map filterable parameters to query"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5afe65bd_03f766d4","line":28,"updated":"2015-06-02 12:59:38.000000000","message":"Actually it\u0027s supposed to be \"less\".","commit_id":"32dbcdafb170c289a3c966da70636f1c5a7b2940"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"7d03e35bad5173b346581c7bed3a79043fba381c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"separate requests per query."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"A different strategy is to specify query objects and pass them as a single"},{"line_number":28,"context_line":"URL-encoded JSON list. This is lest client-friendly because it requires extra"},{"line_number":29,"context_line":"encoding steps."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"The simplest way to allow filtering is to map filterable parameters to query"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5afe65bd_9365fee2","line":28,"updated":"2015-06-01 22:42:40.000000000","message":"should this be \"least client-friendly\" ?","commit_id":"32dbcdafb170c289a3c966da70636f1c5a7b2940"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"0aaf3806bf7d9ce0bdf2ab085382b8efc0a9bc9b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"  }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"If values contain commas, they can be quoted similar to CSV escaping. For"},{"line_number":88,"context_line":"example, a query for the value ``a,bc`` of ``d`` would be"},{"line_number":89,"context_line":"``?f_foo\u003din,\"a,bc\",d``. If values contain double-quotes, those can be"},{"line_number":90,"context_line":"backslashed inside quotes. For a value ``a\"b\"c`` the query would be"},{"line_number":91,"context_line":"``?f_foo\u003d\"a\\\"b\\\"c\"``."}],"source_content_type":"text/x-rst","patch_set":9,"id":"5afe65bd_e3032ab7","line":88,"updated":"2015-06-02 12:59:38.000000000","message":"Done.","commit_id":"32dbcdafb170c289a3c966da70636f1c5a7b2940"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"80c5b919b9a198ee716fef4b34ab60c3e232b262","unresolved":false,"context_lines":[{"line_number":85,"context_line":"  }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"If values contain commas, they can be quoted similar to CSV escaping. For"},{"line_number":88,"context_line":"example, a query for the value ``a,bc`` of ``d`` would be"},{"line_number":89,"context_line":"``?f_foo\u003din,\"a,bc\",d``. If values contain double-quotes, those can be"},{"line_number":90,"context_line":"backslashed inside quotes. For a value ``a\"b\"c`` the query would be"},{"line_number":91,"context_line":"``?f_foo\u003d\"a\\\"b\\\"c\"``."}],"source_content_type":"text/x-rst","patch_set":9,"id":"5afe65bd_ee8e9326","line":88,"updated":"2015-06-01 16:49:18.000000000","message":"s/of/or/","commit_id":"32dbcdafb170c289a3c966da70636f1c5a7b2940"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"6e828093eb646d388714daef485a0721008a5f48","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    ]"},{"line_number":114,"context_line":"  }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"**TODO:** Add guidance on a \"LIKE\" or regex operator to search text."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"Paginating responses should be done *after* applying the filters in a query,"},{"line_number":119,"context_line":"because it\u0027s possible for there to be no matches in the first page of results,"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5afe65bd_3d173aef","line":116,"updated":"2015-06-01 21:20:55.000000000","message":"Another nice enhancement (that I\u0027m happy to leave for later if you don\u0027t want to complicate this patch more) is to allow ranges. For example, if you want items that have foo between 5 and 8 you can do:\n\n    ?f_foo\u003dgte,5,lte,8\n\nThis should also work for strings, obviously.","commit_id":"32dbcdafb170c289a3c966da70636f1c5a7b2940"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"0aaf3806bf7d9ce0bdf2ab085382b8efc0a9bc9b","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    ]"},{"line_number":114,"context_line":"  }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"**TODO:** Add guidance on a \"LIKE\" or regex operator to search text."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"Paginating responses should be done *after* applying the filters in a query,"},{"line_number":119,"context_line":"because it\u0027s possible for there to be no matches in the first page of results,"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5afe65bd_c3002ead","line":116,"updated":"2015-06-02 12:59:38.000000000","message":"I\u0027m planning a few follow-ons to this spec, one for LIKE, one for RANGE, and one for date/time ranges.","commit_id":"32dbcdafb170c289a3c966da70636f1c5a7b2940"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"03d6b23de85438d6978f9e8fb537844fac9789ba","unresolved":false,"context_lines":[{"line_number":66,"context_line":"``/app/items?f_foo\u003dbuzz\u0026f_baz\u003dquux`` would provide no results."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"**OR** is available for single fields, using comma-separated options for the"},{"line_number":69,"context_line":"field value and the ``in`` operator.::"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"  GET /app/items?f_foo\u003din,buzz,bar"},{"line_number":72,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_d132cba6","line":69,"updated":"2015-06-18 07:19:56.000000000","message":"It seems to me that this would more clearly described as an \"IN\" operation rather than an OR. I am aware reading it as \u0027the field value must be \"in\" _or_ \"buzz\" _or_ \"bar\" \u0027 is correct.\n\nI just think reading it as the \"field value must be in the list \u0027in\u0027, \u0027buzz\u0027, \u0027bar\u0027\" is easier to understand. It also creates a distinction with OR across multiple fields which is not supported.","commit_id":"0091b9e1bf3373d210fc727c08f31b3b06b6a94b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"03d6b23de85438d6978f9e8fb537844fac9789ba","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"If values contain commas, they can be quoted similar to CSV escaping. For"},{"line_number":88,"context_line":"example, a query for the value ``a,bc`` or ``d`` would be"},{"line_number":89,"context_line":"``?f_foo\u003din,\"a,bc\",d``. If values contain double-quotes, those can be"},{"line_number":90,"context_line":"backslashed inside quotes. For a value ``a\"b\"c`` the query would be"},{"line_number":91,"context_line":"``?f_foo\u003d\"a\\\"b\\\"c\"``."},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_91df6339","line":89,"updated":"2015-06-18 07:19:56.000000000","message":"should \"a\u0026#44;bc\" be regarded as valid?","commit_id":"0091b9e1bf3373d210fc727c08f31b3b06b6a94b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"03d6b23de85438d6978f9e8fb537844fac9789ba","unresolved":false,"context_lines":[{"line_number":96,"context_line":"``neq``, ``gt``, ``gte``, ``lt``, and ``lte``. Simple equality is the default"},{"line_number":97,"context_line":"operation, and is performed as ``?f_param\u003dfoo``. Operators must be followed by"},{"line_number":98,"context_line":"commas, so the query ``?f_foo\u003dgte`` searches for the literal string \"gte\" and"},{"line_number":99,"context_line":"searching for \"gte,\" can be done by quoting the value as ``?f_foo\u003d\"gte,\"``."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":102,"context_line":"example, finding objects with a size greater than 8 would be written as"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fa32b979_71b3bf0a","line":99,"updated":"2015-06-18 07:19:56.000000000","message":"the last three lines here are a bit out of context. This is just a pedant note, but I would consider putting them after the next paragraph.","commit_id":"0091b9e1bf3373d210fc727c08f31b3b06b6a94b"},{"author":{"_account_id":12606,"name":"Miguel Grinberg","email":"miguel.grinberg@gmail.com","username":"miguelgrinberg"},"change_message_id":"eb57d52f4f360912eed914e8d471fec91665dcd4","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":102,"context_line":"example, finding objects with a size greater than 8 would be written as"},{"line_number":103,"context_line":"``?f_size\u003dgt,9`` and would return::"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  GET /app/items?f_size\u003dgt,8"},{"line_number":106,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_2b693a8c","line":103,"updated":"2015-06-04 23:05:00.000000000","message":"Not worth resubmitting unless you have other changes to make, but note you wrote a 9 instead of an 8 here.","commit_id":"0091b9e1bf3373d210fc727c08f31b3b06b6a94b"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"5e929a21d14c0df0776e3433a9f2fe707bd3f8ec","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"They can be used in queries compounded with the values they work on. For"},{"line_number":102,"context_line":"example, finding objects with a size greater than 8 would be written as"},{"line_number":103,"context_line":"``?f_size\u003dgt,9`` and would return::"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  GET /app/items?f_size\u003dgt,8"},{"line_number":106,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_9c8f3923","line":103,"in_reply_to":"3afb71cf_2b693a8c","updated":"2015-06-05 15:30:51.000000000","message":"Heh, oops. Noted for if I revise this patch.","commit_id":"0091b9e1bf3373d210fc727c08f31b3b06b6a94b"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"24bf63e22b5416b8213d7d7fa1f24f0f81d977b3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"      {"},{"line_number":58,"context_line":"        \"foo\": \"buzz\","},{"line_number":59,"context_line":"        \"baz\": \"honk\","},{"line_number":60,"context_line":"        \"size\": 9"},{"line_number":61,"context_line":"      }"},{"line_number":62,"context_line":"    ]"},{"line_number":63,"context_line":"  }"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa32b979_09aad870","line":60,"updated":"2015-06-22 07:49:08.000000000","message":"I think this should be 6, not 9.","commit_id":"a3e39c5a06884d30d14765f0b1cd1b221e38055a"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"f9d900efb9a16ee1f44c85a6955d387c384cd121","unresolved":false,"context_lines":[{"line_number":57,"context_line":"      {"},{"line_number":58,"context_line":"        \"foo\": \"buzz\","},{"line_number":59,"context_line":"        \"baz\": \"honk\","},{"line_number":60,"context_line":"        \"size\": 9"},{"line_number":61,"context_line":"      }"},{"line_number":62,"context_line":"    ]"},{"line_number":63,"context_line":"  }"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa32b979_8676bf3c","line":60,"in_reply_to":"fa32b979_09aad870","updated":"2015-06-22 14:50:42.000000000","message":"Ah, good catch. I\u0027ll fix this in a follow-up patch since this guideline is frozen.","commit_id":"a3e39c5a06884d30d14765f0b1cd1b221e38055a"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"24bf63e22b5416b8213d7d7fa1f24f0f81d977b3","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        \"size\": 9"},{"line_number":112,"context_line":"      }"},{"line_number":113,"context_line":"    ]"},{"line_number":114,"context_line":"  }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Operators must be followed by colons, so the query ``?f_foo\u003dgte`` searches for"},{"line_number":117,"context_line":"the literal string \"gte\" and searching for \"gte:\" can be done by quoting the"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa32b979_e9f1b496","line":114,"updated":"2015-06-22 07:49:08.000000000","message":"It would be nice to clarify here what would be the response to:\n\n  /app/items?f_baz\u003dgt:5\n\nbecause it\u0027s bound to come up.","commit_id":"a3e39c5a06884d30d14765f0b1cd1b221e38055a"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"c78d14959ee6bc70608e750896919111b7464007","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        \"size\": 9"},{"line_number":112,"context_line":"      }"},{"line_number":113,"context_line":"    ]"},{"line_number":114,"context_line":"  }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Operators must be followed by colons, so the query ``?f_foo\u003dgte`` searches for"},{"line_number":117,"context_line":"the literal string \"gte\" and searching for \"gte:\" can be done by quoting the"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa32b979_26d493bb","line":114,"in_reply_to":"fa32b979_66e05bcd","updated":"2015-06-22 14:54:18.000000000","message":"Yes, definitely. I\u0027ve hit this kind of question before, and it usually looks like `400` is the best response, even though the wording in the HTTP spec (\u0027malformed syntax\u0027) doesn\u0027t really fit.  I think a followup patch would be the best place for this, too.","commit_id":"a3e39c5a06884d30d14765f0b1cd1b221e38055a"},{"author":{"_account_id":12321,"name":"Ryan Brown","email":"rybrown@redhat.com","username":"ryansb"},"change_message_id":"f9d900efb9a16ee1f44c85a6955d387c384cd121","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        \"size\": 9"},{"line_number":112,"context_line":"      }"},{"line_number":113,"context_line":"    ]"},{"line_number":114,"context_line":"  }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"Operators must be followed by colons, so the query ``?f_foo\u003dgte`` searches for"},{"line_number":117,"context_line":"the literal string \"gte\" and searching for \"gte:\" can be done by quoting the"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa32b979_66e05bcd","line":114,"in_reply_to":"fa32b979_e9f1b496","updated":"2015-06-22 14:50:42.000000000","message":"For type mismatches of that type, I imagine most users would expect a 4XX-range status. Does that sound reasonable?","commit_id":"a3e39c5a06884d30d14765f0b1cd1b221e38055a"}]}
