Hi,
Not much activity on the group but let's try any way.
I was using this snippet of code I found in the tests to scroll through a lot of query results...
(defn fetch-scroll-results
[scroll-id results]
(let [scroll-response (esd/scroll conn scroll-id {:scroll "1m"})
hits (hits-from scroll-response)]
(println "here")
(if (seq hits)
(recur (:_scroll_id scroll-response) (concat results hits))
(concat results hits))))
But it blows up with this response.
"{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Failed to parse request body\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"Failed to parse request body\",\"caused_by\":{\"type\":\"json_parse_exception\",\"reason\":\"Unrecognized token 'DnF1ZXJ5VGhlbkZldGNoWgAAAAAAAA4dFnYxemYxQW9aUlhTYmotVFZtSEpsWEEAAAAAACCadRZ0REJTdElGSVF2bWJQZ3NLeGwzbXB3AAAAAAAADh4WdjF6ZjFBb1pSWFNiai1UVm1ISmxYQQAAAAAAABgXFlo2V24yUnhTU2VTYTFrbnp0Ql9LZGcAAAAAAAAYFhZaNlduMlJ4U1NlU2Exa256dEJfS2RnAAAAAAAADh8WdjF6ZjFBb1pSWFNi...': was expecting ('true', 'false' or 'null')\\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@1ddaa960; line: 1, column: 257]\"}},\"status\":400}",
It looks like I am using Elastic 5.6.13 (it is part of OpenShift).
{
"name" : "logging-es-data-master-vamp431b",
"cluster_name" : "logging-es",
"cluster_uuid" : "HEk06iYDQYSO2d3Xc6moRg",
"version" : {
"number" : "5.6.13",
"build_hash" : "921f2bd",
"build_date" : "2018-11-16T16:58:29.974Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"
}
Any ideas on what is wrong?
This is the query I am using and it brings back a great big scroll_id and the first result.
(esd/search conn "project.*" "" {:query (q/bool {:must [{:match_all {}} {:exists {:field :mdc.X-B3-TraceId}}]})
:search_type "query_then_fetch"
:scroll "1m"
:size 1} )