Advertisement
Ksenia_C

Untitled

Feb 10th, 2022
1,209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ksenia-c@LAPTOP-5BQNBU76:~/m_code_search$ cs search2 code_index_2 ./codesearch/es/example_request.json
  2. {'query': {'bool': {'must': {'multi_match': {'query': 'get columns of dataset', 'fields': ['docstring^3', 'identifiers', 'function_name'], 'fuzziness': 'AUTO', 'prefix_length': 2}}, 'filter': {'bool': {'must': [{'terms': {'language': ['Python', 'C++']}}, {'range': {'stargazers_count': {'gte': 100, 'lte': inf}}}]}}}}, 'from': 0, 'size': 8}
  3. /home/ksenia-c/.local/lib/python3.8/site-packages/elasticsearch/connection/base.py:200: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.15/security-minimal-setup.html to enable security.
  4.   warnings.warn(message, category=ElasticsearchWarning)
  5. Traceback (most recent call last):
  6.   File "/home/ksenia-c/.local/bin/cs", line 11, in <module>
  7.     load_entry_point('codesearch', 'console_scripts', 'cs')()
  8.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
  9.     return self.main(*args, **kwargs)
  10.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/click/core.py", line 1053, in main
  11.     rv = self.invoke(ctx)
  12.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
  13.     return _process_result(sub_ctx.command.invoke(sub_ctx))
  14.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
  15.     return ctx.invoke(self.callback, **ctx.params)
  16.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
  17.     return __callback(*args, **kwargs)
  18.   File "/home/ksenia-c/m_code_search/codesearch/cmd/run.py", line 102, in search2
  19.     pprint(ES.search_doc(index_name, data))
  20.   File "/home/ksenia-c/m_code_search/codesearch/es/client.py", line 61, in search_doc
  21.     res = self.instance.search(index=index_name, body=search_request)
  22.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 347, in _wrapped
  23.     return func(*args, params=params, headers=headers, **kwargs)
  24.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/elasticsearch/client/__init__.py", line 1830, in search
  25.     return self.transport.perform_request(
  26.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/elasticsearch/transport.py", line 466, in perform_request
  27.     raise e
  28.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/elasticsearch/transport.py", line 427, in perform_request
  29.     status, headers_response, data = connection.perform_request(
  30.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 291, in perform_request
  31.     self._raise_error(response.status, raw_data)
  32.   File "/home/ksenia-c/.local/lib/python3.8/site-packages/elasticsearch/connection/base.py", line 328, in _raise_error
  33.     raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
  34. elasticsearch.exceptions.RequestError: RequestError(400, 'x_content_parse_exception', '[1:275] [bool] failed to parse field [must]')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement