{"action":"opened","issue":{"url":"https://api.github.com/repos/insomnia-lab/libreant/issues/292","repository_url":"https://api.github.com/repos/insomnia-lab/libreant","labels_url":"https://api.github.com/repos/insomnia-lab/libreant/issues/292/labels{/name}","comments_url":"https://api.github.com/repos/insomnia-lab/libreant/issues/292/comments","events_url":"https://api.github.com/repos/insomnia-lab/libreant/issues/292/events","html_url":"https://github.com/insomnia-lab/libreant/issues/292","id":154866517,"number":292,"title":"broken more_like_this","user":{"login":"ael-code","id":4229536,"avatar_url":"https://avatars.githubusercontent.com/u/4229536?v=3","gravatar_id":"","url":"https://api.github.com/users/ael-code","html_url":"https://github.com/ael-code","followers_url":"https://api.github.com/users/ael-code/followers","following_url":"https://api.github.com/users/ael-code/following{/other_user}","gists_url":"https://api.github.com/users/ael-code/gists{/gist_id}","starred_url":"https://api.github.com/users/ael-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ael-code/subscriptions","organizations_url":"https://api.github.com/users/ael-code/orgs","repos_url":"https://api.github.com/users/ael-code/repos","events_url":"https://api.github.com/users/ael-code/events{/privacy}","received_events_url":"https://api.github.com/users/ael-code/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-14T17:43:01Z","updated_at":"2016-05-14T17:43:01Z","closed_at":null,"body":"```\r\n2016-05-14 19:34:34,194 [webant] [INFO] Listening on http://0.0.0.0:5001/\r\n2016-05-14 19:34:35,705 [archivant] [DEBUG] Requested volume with id:'AVU6zOKd-8IXwu1gElrM'\r\n2016-05-14 19:34:35,710 [libreantdb.api] [DEBUG] waiting for index \"propirata\" to be ready\r\n2016-05-14 19:34:35,713 [libreantdb.api] [DEBUG] index \"propirata\" is now ready\r\nTraceback (most recent call last):\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/flask/app.py\", line 1836, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/flask/app.py\", line 1820, in wsgi_app\r\n    response = self.make_response(self.handle_exception(e))\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/flask/app.py\", line 1403, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/flask/app.py\", line 1477, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/flask/app.py\", line 1381, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/flask/app.py\", line 1475, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/flask/app.py\", line 1461, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/authbone/authentication.py\", line 54, in decorated\r\n    return f(*args, **kwargs)\r\n  File \"/opt/libreant/webant/webant.py\", line 262, in view_volume\r\n    similar = app.archivant._db.mlt(volume['id'])['hits']['hits'][:10]\r\n  File \"/opt/libreant/libreantdb/api.py\", line 177, in mlt\r\n    return self._search(dict(query=query))\r\n  File \"/opt/libreant/libreantdb/api.py\", line 156, in _search\r\n    return self.es.search(index=self.index_name, body=body, **kargs)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/elasticsearch/client/utils.py\", line 69, in _wrapped\r\n    return func(*args, params=params, **kwargs)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/elasticsearch/client/__init__.py\", line 531, in search\r\n    doc_type, '_search'), params=params, body=body)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/elasticsearch/transport.py\", line 307, in perform_request\r\n    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py\", line 93, in perform_request\r\n    self._raise_error(response.status, raw_data)\r\n  File \"/opt/libreant/ve/lib/python2.7/site-packages/elasticsearch/connection/base.py\", line 105, in _raise_error\r\n    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)\r\nRequestError: TransportError(400, u'SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[P6K7SoFkSNuY_ZTTXvpi9A][propirata_v1][0]: RemoteTransportException[[Gemini][inet[/10.10.10.138:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[propirata_v1][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"more_like_this\": {\"min_doc_freq\": 1, \"fields\": [\"book._text_it\", \"book._text_en\"], \"ids\": [\"AVU6zOKd-8IXwu1gElrM\"], \"min_term_freq\": 1}}}]]]; nested: QueryParsingException[[propirata_v1] ambiguous type for item with id: AVU6zOKd-8IXwu1gElrM and index: propirata_v1]; }{[P6K7SoFkSNuY_ZTTXvpi9A][propirata_v1][1]: RemoteTransportException[[Gemini][inet[/10.10.10.138:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[propirata_v1][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"more_like_this\": {\"min_doc_freq\": 1, \"fields\": [\"book._text_it\", \"book._text_en\"], \"ids\": [\"AVU6zOKd-8IXwu1gElrM\"], \"min_term_freq\": 1}}}]]]; nested: QueryParsingException[[propirata_v1] ambiguous type for item with id: AVU6zOKd-8IXwu1gElrM and index: propirata_v1]; }{[P6K7SoFkSNuY_ZTTXvpi9A][propirata_v1][2]: RemoteTransportException[[Gemini][inet[/10.10.10.138:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[propirata_v1][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"more_like_this\": {\"min_doc_freq\": 1, \"fields\": [\"book._text_it\", \"book._text_en\"], \"ids\": [\"AVU6zOKd-8IXwu1gElrM\"], \"min_term_freq\": 1}}}]]]; nested: QueryParsingException[[propirata_v1] ambiguous type for item with id: AVU6zOKd-8IXwu1gElrM and index: propirata_v1]; }{[P6K7SoFkSNuY_ZTTXvpi9A][propirata_v1][3]: RemoteTransportException[[Gemini][inet[/10.10.10.138:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[propirata_v1][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"more_like_this\": {\"min_doc_freq\": 1, \"fields\": [\"book._text_it\", \"book._text_en\"], \"ids\": [\"AVU6zOKd-8IXwu1gElrM\"], \"min_term_freq\": 1}}}]]]; nested: QueryParsingException[[propirata_v1] ambiguous type for item with id: AVU6zOKd-8IXwu1gElrM and index: propirata_v1]; }{[NAr392GCRk2EGc0qARlF0Q][propirata_v1][4]: SearchParseException[[propirata_v1][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"more_like_this\": {\"min_doc_freq\": 1, \"fields\": [\"book._text_it\", \"book._text_en\"], \"ids\": [\"AVU6zOKd-8IXwu1gElrM\"], \"min_term_freq\": 1}}}]]]; nested: QueryParsingException[[propirata_v1] ambiguous type for item with id: AVU6zOKd-8IXwu1gElrM and index: propirata_v1]; }]')\r\n```\r\n\r\nIt seems that this is caused by an explicit document type specification in the query. In fact we don't specify explicitly the document type in the `libreantdb/api.py:DB._search()`.\r\n\r\nThis is the first time that I see this error. I don't know how to reproduce it."}}