)]}'
{"doc/source/searchlightapi.rst":[{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"f0a2ca6f9aa8bf5b3a22973b5d8952165199fbe1","unresolved":false,"context_lines":[{"line_number":272,"context_line":"``limit`` and ``offset`` respectively as synonyms). ``from`` is"},{"line_number":273,"context_line":"zero-indexed. If ``size`` is zero, no results will be returned. This"},{"line_number":274,"context_line":"can be useful for retrieving the total number of hits for a query without"},{"line_number":275,"context_line":"being interested in the results themselves, or for `aggregations`_::"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":" {"},{"line_number":278,"context_line":"   \"query\": {\"match_all\": {}},"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a95cdbc_4b47231d","line":275,"updated":"2016-10-06 00:01:09.000000000","message":"If we are going to switch over to using ES terms, I would prefer that we be more \"aggressive\" in the switch over. We should mention that previous versions of the Searchlight API used limit and offset, but the preferred usage is \"size\" and \"from\". Maybe hint at the former being deprecated in the future. Otherwise there may be some confusion.\n\nWe can also mention that if both are specified, then \"size\" and \"from\" take precedence. This would simplify the code.","commit_id":"c2376d77c18fdf0d857cc9a31905809ebb00963b"}],"searchlight/api/v1/search.py":[{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"f0a2ca6f9aa8bf5b3a22973b5d8952165199fbe1","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            msg \u003d _(\"%s param must be an integer\") % param_name"},{"line_number":208,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        if value \u003c gte:"},{"line_number":211,"context_line":"            msg \u003d _(\"%(param_name)s param must be greater than or equal \""},{"line_number":212,"context_line":"                    \"to %(gte)s\") % {\u0027param_name\u0027: param_name, \u0027gte\u0027: gte}"},{"line_number":213,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_4b78032c","line":210,"updated":"2016-10-06 00:01:09.000000000","message":"Will \"gte\" always be zero? If so I think we should just remove the \"gte\" parameter and hard-code this check to 0 like we did previously. I also think that will make the error message clearer (param must be positive integer).","commit_id":"c2376d77c18fdf0d857cc9a31905809ebb00963b"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"f0a2ca6f9aa8bf5b3a22973b5d8952165199fbe1","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        return value"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def _validate_offset(self, offset, _from):"},{"line_number":218,"context_line":"        if offset is not None and _from is not None:"},{"line_number":219,"context_line":"            msg \u003d \"Provide \u0027offset\u0027 or \u0027_from\u0027, but not both\""},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_2ba497a4","line":217,"range":{"start_line":217,"start_character":39,"end_line":217,"end_character":44},"updated":"2016-10-06 00:01:09.000000000","message":"Nit: It would be nice if this was consistent and called \"from_\".","commit_id":"c2376d77c18fdf0d857cc9a31905809ebb00963b"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"f0a2ca6f9aa8bf5b3a22973b5d8952165199fbe1","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        types \u003d body.pop(\u0027type\u0027, None)"},{"line_number":404,"context_line":"        _source \u003d body.pop(\u0027_source\u0027, None)"},{"line_number":405,"context_line":"        offset \u003d body.pop(\u0027offset\u0027, None)"},{"line_number":406,"context_line":"        from_ \u003d body.pop(\u0027from\u0027, None)"},{"line_number":407,"context_line":"        limit \u003d body.pop(\u0027limit\u0027, None)"},{"line_number":408,"context_line":"        size \u003d body.pop(\u0027size\u0027, None)"},{"line_number":409,"context_line":"        highlight \u003d body.pop(\u0027highlight\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_ab04277e","line":406,"updated":"2016-10-06 00:01:09.000000000","message":"If we allow \"from\" and \"size\" to have precedence, instead of an error when the synonyms are also specified, we can replace these two lines with from_ \u003d body.pop(\u0027from\u0027, body.pop(\u0027offset\u0027, None))","commit_id":"c2376d77c18fdf0d857cc9a31905809ebb00963b"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"f0a2ca6f9aa8bf5b3a22973b5d8952165199fbe1","unresolved":false,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":"        limit \u003d self._validate_limit(limit, size)"},{"line_number":495,"context_line":"        if limit is not None:"},{"line_number":496,"context_line":"            query_params[\u0027limit\u0027] \u003d limit"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        if highlight is not None:"},{"line_number":499,"context_line":"            self._set_highlight_queries(highlight, query)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_6ee86d11","line":496,"updated":"2016-10-06 00:01:09.000000000","message":"It would be nice to eventually change the query_params[] names to match the ES (so we don\u0027t need to do it implicitly in elasticsearch/__init__.py:search). But I guess that can be a future low hanging fruit.","commit_id":"c2376d77c18fdf0d857cc9a31905809ebb00963b"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"ff1f679037b4dbe46b63cf3e0016ac5da62faca5","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def _validate_offset(self, offset, _from):"},{"line_number":218,"context_line":"        if offset is not None and _from is not None:"},{"line_number":219,"context_line":"            msg \u003d \"Provide \u0027offset\u0027 or \u0027_from\u0027, but not both\""},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        if offset is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_052b8334","line":219,"updated":"2016-10-18 01:48:15.000000000","message":"s/_from/from","commit_id":"7dc695a5e89048ad1603a3aec8167152c21db7fd"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3a0f04ce6a640a9eaaaa6b5f89b5e3930dc2fa16","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def _validate_offset(self, offset, _from):"},{"line_number":218,"context_line":"        if offset is not None and _from is not None:"},{"line_number":219,"context_line":"            msg \u003d \"Provide \u0027offset\u0027 or \u0027_from\u0027, but not both\""},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        if offset is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_e7ad3aea","line":219,"in_reply_to":"fa6399be_052b8334","updated":"2016-10-20 15:45:09.000000000","message":"Oops, thanks","commit_id":"7dc695a5e89048ad1603a3aec8167152c21db7fd"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"ff1f679037b4dbe46b63cf3e0016ac5da62faca5","unresolved":false,"context_lines":[{"line_number":487,"context_line":""},{"line_number":488,"context_line":"        query_params[\u0027_source_exclude\u0027] \u003d source_exclude"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"        offset \u003d self._validate_offset(offset, from_)"},{"line_number":491,"context_line":"        if offset is not None:"},{"line_number":492,"context_line":"            query_params[\u0027offset\u0027] \u003d offset"},{"line_number":493,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_05870313","line":490,"updated":"2016-10-18 01:48:15.000000000","message":"tiny nit, if offset and from_ are both None, no need to validate","commit_id":"7dc695a5e89048ad1603a3aec8167152c21db7fd"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3a0f04ce6a640a9eaaaa6b5f89b5e3930dc2fa16","unresolved":false,"context_lines":[{"line_number":487,"context_line":""},{"line_number":488,"context_line":"        query_params[\u0027_source_exclude\u0027] \u003d source_exclude"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"        offset \u003d self._validate_offset(offset, from_)"},{"line_number":491,"context_line":"        if offset is not None:"},{"line_number":492,"context_line":"            query_params[\u0027offset\u0027] \u003d offset"},{"line_number":493,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_07530ee3","line":490,"in_reply_to":"fa6399be_05870313","updated":"2016-10-20 15:45:09.000000000","message":"Yeah, the _validate function checks that - trying not to clutter this function too much","commit_id":"7dc695a5e89048ad1603a3aec8167152c21db7fd"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"ff1f679037b4dbe46b63cf3e0016ac5da62faca5","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        if offset is not None:"},{"line_number":492,"context_line":"            query_params[\u0027offset\u0027] \u003d offset"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"        limit \u003d self._validate_limit(limit, size)"},{"line_number":495,"context_line":"        if limit is not None:"},{"line_number":496,"context_line":"            query_params[\u0027limit\u0027] \u003d limit"},{"line_number":497,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_857b1329","line":494,"updated":"2016-10-18 01:48:15.000000000","message":"same here","commit_id":"7dc695a5e89048ad1603a3aec8167152c21db7fd"}],"searchlight/elasticsearch/__init__.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"ff1f679037b4dbe46b63cf3e0016ac5da62faca5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self._plugins_list \u003d self._get_plugin_list()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def search(self, index, doc_type, query, from_,"},{"line_number":64,"context_line":"               size, ignore_unavailable\u003dTrue, **kwargs):"},{"line_number":65,"context_line":"        return self.es_api.search("},{"line_number":66,"context_line":"            index\u003dindex,"},{"line_number":67,"context_line":"            doc_type\u003ddoc_type,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_45af3b7d","line":64,"updated":"2016-10-18 01:48:15.000000000","message":"change this [1] also for consistent?\n\n[1]: https://github.com/openstack/searchlight/blob/master/searchlight/elasticsearch/__init__.py#L63","commit_id":"7dc695a5e89048ad1603a3aec8167152c21db7fd"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3a0f04ce6a640a9eaaaa6b5f89b5e3930dc2fa16","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self._plugins_list \u003d self._get_plugin_list()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def search(self, index, doc_type, query, from_,"},{"line_number":64,"context_line":"               size, ignore_unavailable\u003dTrue, **kwargs):"},{"line_number":65,"context_line":"        return self.es_api.search("},{"line_number":66,"context_line":"            index\u003dindex,"},{"line_number":67,"context_line":"            doc_type\u003ddoc_type,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_e787fab2","line":64,"in_reply_to":"fa6399be_45af3b7d","updated":"2016-10-20 15:45:09.000000000","message":"Did you mean in search.py:SearchController? I was trying to avoid having to change loads of tests but I\u0027ll see how many it breaks","commit_id":"7dc695a5e89048ad1603a3aec8167152c21db7fd"}],"searchlight/tests/unit/v1/test_search.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"10b3c91715bf6675dd10c1feffe47310b8ed0665","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        }))"},{"line_number":580,"context_line":"        self.assertRaisesRegexp("},{"line_number":581,"context_line":"            webob.exc.HTTPBadRequest,"},{"line_number":582,"context_line":"            \"Provide \u0027offset\u0027 or \u0027_from\u0027, but not both\","},{"line_number":583,"context_line":"            self.deserializer.search, request)"},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"    def test_limit_size_error(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_8c3a30cc","line":582,"range":{"start_line":582,"start_character":34,"end_line":582,"end_character":40},"updated":"2016-10-19 02:12:41.000000000","message":"update this to \"from\" also?","commit_id":"7dc695a5e89048ad1603a3aec8167152c21db7fd"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3a0f04ce6a640a9eaaaa6b5f89b5e3930dc2fa16","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        }))"},{"line_number":580,"context_line":"        self.assertRaisesRegexp("},{"line_number":581,"context_line":"            webob.exc.HTTPBadRequest,"},{"line_number":582,"context_line":"            \"Provide \u0027offset\u0027 or \u0027_from\u0027, but not both\","},{"line_number":583,"context_line":"            self.deserializer.search, request)"},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"    def test_limit_size_error(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_47bd0667","line":582,"range":{"start_line":582,"start_character":34,"end_line":582,"end_character":40},"in_reply_to":"fa6399be_8c3a30cc","updated":"2016-10-20 15:45:09.000000000","message":"Yep, thanks","commit_id":"7dc695a5e89048ad1603a3aec8167152c21db7fd"}]}
