Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@staging-discovery-78b9d8bb89-8zppf:/app# curl -X GET "elasticsearch-elasticsearch-svc:9200/listings/_search?pretty=true" -H 'Content-Type: application/json' -d'
- > {
- > "query" : {
- > "match_all": {}
- > },
- > "sort" : {
- > "_script" : {
- > "type" : "number",
- > "script" : {
- > "lang": "painless",
- > "source": "if(params._source.containsKey(\"price\") && params._source.price.containsKey(\"currency\") && params._source.price.currency.containsKey(\"id\")) { return Float.parseFloat(params._source.price.amount) * Float.parseFloat(params.exchangeRates[params._source.price.currency.id]); } else { return params.order == \"asc\" ? 100000000000 : 0 }",
- > "params" : {
- > "order": "asc",
- > "exchangeRates" : {
- > "fiat-USD" : "1.0",
- > "fiat-EUR" : "1.0749",
- > "fiat-GBP" : "1.216",
- > "fiat-KRW" : "0.00061",
- > "fiat-JPY" : "0.00917",
- > "token-ETH" : "215.269",
- > "token-DAI" : "1.0000475"
- > }
- > }
- > },
- > "order" : "asc"
- > }
- > }
- > }
- > '
- {
- "error" : {
- "root_cause" : [
- {
- "type" : "script_exception",
- "reason" : "compile error",
- "script_stack" : [
- "... params.order == \"asc\" ? 100000000000 : 0 }",
- " ^---- HERE"
- ],
- "script" : "if(params._source.containsKey(\"price\") && params._source.price.containsKey(\"currency\") && params._source.price.currency.containsKey(\"id\")) { return Float.parseFloat(params._source.price.amount) * Float.parseFloat(params.exchangeRates[params._source.price.currency.id]); } else { return params.order == \"asc\" ? 100000000000 : 0 }",
- "lang" : "painless"
- }
- ],
- "type" : "search_phase_execution_exception",
- "reason" : "all shards failed",
- "phase" : "query",
- "grouped" : true,
- "failed_shards" : [
- {
- "shard" : 0,
- "index" : "listings_4",
- "node" : "eGOsM1SOT_OhK-ruytxS_w",
- "reason" : {
- "type" : "script_exception",
- "reason" : "compile error",
- "script_stack" : [
- "... params.order == \"asc\" ? 100000000000 : 0 }",
- " ^---- HERE"
- ],
- "script" : "if(params._source.containsKey(\"price\") && params._source.price.containsKey(\"currency\") && params._source.price.currency.containsKey(\"id\")) { return Float.parseFloat(params._source.price.amount) * Float.parseFloat(params.exchangeRates[params._source.price.currency.id]); } else { return params.order == \"asc\" ? 100000000000 : 0 }",
- "lang" : "painless",
- "caused_by" : {
- "type" : "illegal_argument_exception",
- "reason" : "Invalid int constant [100000000000]. If you want a long constant then change it to [100000000000L]."
- }
- }
- }
- ]
- },
- "status" : 500
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement