Open TomonoriSoejima opened 4 years ago
Attached is my rally config and it can be executed like
esrally --track--path=./my_rally/ --pipeline=benchmark-only --target-hosts=localhost:9200
But I ended up in using https://codebeautify.org/json-escape-unescape to do it after all.
Suppose you had a request like this on Console in Dev tools.
And pressing Command+I right on the text will give you
{"query":{"term":{"busy_month.keyword":{"value":"JANUARY"}}}}
Now that you need to escape the quotes when you want to run it from
_msearch
inside rally's configuration.This process was a bit tiresome and after many attempts of string play I ended up with something like this.
Also, rally will want the request body to be a single line for
_msearch
Note that the existence of newline
\n
there.So but if you added it by hand and iterate like this,
\n
will get lost as you can see.So the workaround was to replace
\n
with other characters such as@
and I came up with this.Then now you get the complete text. This should be very handy if you are dealing with a much more lengthy request.