Closed maggienj closed 7 years ago
From ES docs... "The boolean query doesn't have a query clause. " So, will have to try removing query clause...
Should match_all be part of a "must" clause instead of a query clause... as shown here... https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
will try this.. in elasticsearch-head
So, should the query be changed like this?
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"term": {
"hash": "vHVozfzn"
}
},
"stored_fields": []
}
}
}
I imagine the "must":{"match_all":{}}
can be removed, since it says nothing. I am concerned that size
is not supported; be sure it is a property of the correct object (not of query).
now it is showing a diff err related to size. so, will reduce the size value and check if that works...
caused by
ERROR: Internal Server Error: {"error":{"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large,
from + size must be less than or equal to: [10000] but was [200000].
See the scroll api for a more efficient way to request large data sets.
This limit can be set by changing the [index.max_result_window] index level setting."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"saved_queries20170524_113002","node":"OX5gNnXQRtW6gThYBtxJ4w","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [200000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}}],"caused_by":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [200000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}},"status":500}
File "C:\Users\user\PycharmProjects\ActiveData\pyLibrary\env\elasticsearch.py", line 760, in post
File "C:\Users\user\PycharmProjects\ActiveData\pyLibrary\env\elasticsearch.py", line 428, in search
File "C:\Users\user\PycharmProjects\ActiveData\pyLibrary\queries\jx_usingES.py", line 213, in update
File "C:\Users\user\PycharmProjects\ActiveData\active_data\actions\save_query.py", line 109, in find
File "C:\Users\user\PycharmProjects\ActiveData\active_data\actions\save_query.py", line 44, in find_query
File "C:\Users\user\PycharmProjects\ActiveData\active_data\__init__.py", line 54, in output
File "C:\Python27\lib\site-packages\flask\app.py", line 1598, in dispatch_request
File "C:\Python27\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
File "C:\Python27\lib\site-packages\flask\app.py", line 1982, in wsgi_app
File "C:\Python27\lib\site-packages\flask\app.py", line 1994, in __call__
File "C:\Python27\lib\site-packages\werkzeug\serving.py", line 197, in execute
File "C:\Python27\lib\site-packages\werkzeug\serving.py", line 209, in run_wsgi
File "C:\Python27\lib\site-packages\werkzeug\serving.py", line 267, in handle_one_request
File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
File "C:\Python27\lib\site-packages\werkzeug\serving.py", line 232, in handle
File "C:\Python27\lib\SocketServer.py", line 652, in __init__
File "C:\Python27\lib\SocketServer.py", line 331, in finish_request
File "C:\Python27\lib\SocketServer.py", line 596, in process_request_thread
File "C:\Python27\lib\threading.py", line 754, in run
File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
File "C:\Python27\lib\threading.py", line 774, in __bootstrap
please push your changes so I may see the net effect.
changes pushed.
I believe this is fixed: You may close this.
Unit Test: tests.test_load_and_save_queries.TestLoadAndSaveQueries.test_save_then_load