Elasticsearch 6.3.0 randomly fails to execute function_score query

Hi,

Using my three node Elasticsearch 6.3.0 cluster I'm trying to execute the following function score query:

{"size": 400, "from": 0, "query": {"nested": {"path": "feature_vectors", "query": {"function_score": {"functions": [{"similar_score": {"feature_vectors.fine_grained.value": {"value": "mg3GopoNxqKaDWaimg1GoppdxoKaHcaivg/ooJpdxpqaDeSgmg3goL4v+KCaDeSi/if5qL4v+aj+J/mgfif5KPvufo4ZPobtUc1s6kuDM6CeNVQj793WMPvFQkkFsEtSpRcJ6o3Gcx5YpD+324FgUmFgMsjILzMlNXUeWJcqP4eFykHBvc5Sar0rSPqWNAbh4Pzm+VuAmTlrPcfNkQk0pnK7ncslGpNxtiM7SZThBhC7+qpwR2Qe+q5UIHZRczp/5NMJaYjzfk6ntFvSGxOzFgRbLJ4EMSpcqmdR5DSMIMA=", "components": [{"size": 64, "weight": 1}, {"size": 64, "weight": 1}, {"size": 64, "weight": 1}, {"size": 32, "weight": 1}]}}}], "query": {"bool": {"filter": [{"terms": {"groups": [6272]}}]}}}}}}, "_source": ["content_id_db", "image_id_db", "url"], "sort": [{"_score": "asc"}]}

Interestingly, although syntactically correct the query randomly fails executing with the following exception:

   File "./computer_vision/image_search_runtime/elasticsearch/api.py", line 192, in _search
    resp = s.execute()
  File "/usr/local/lib/python3.5/site-packages/elasticsearch_dsl/search.py", line 639, in execute
    **self._params
  File "/usr/local/lib/python3.5/site-packages/elasticsearch/client/utils.py", line 73, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/elasticsearch/client/__init__.py", line 623, in search
    doc_type, '_search'), params=params, body=body)
  File "/usr/local/lib/python3.5/site-packages/elasticsearch/transport.py", line 312, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/usr/local/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py", line 128, in perform_request
    self._raise_error(response.status, raw_data)
  File "/usr/local/lib/python3.5/site-packages/elasticsearch/connection/base.py", line 125, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: TransportError(400, 'parsing_exception', 'no [query] registered for [function_score]')

This issue does not occur at every query execution, but instead of every fourth or fifth for instance.

What could the issue be?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.