elasticsearch - Pass an array of integers to ElasticSeach template -
elasticsearch - Pass an array of integers to ElasticSeach template -
i trying pass array of integers elasticsearch template using below mustache template.
{{#filter5_terms}} "terms": { "{{filter5_name}}": [ "{{#filter5_lt}}", "{{.}}", "{{/filter5_lt}}" ] } {{/filter5_terms}}
above works, if pass string array (ex: ["a","b"]. same failing int array [1,2] nested: numberformatexception[for input string: ""]; error.
reference: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html#_passing_an_array_of_strings
can please allow me know if missing anything?
thanks anil
i did prepare this. can utilize below replace integer array elasticsearch query.
"terms": { "{{filter5_name}}": {{filter5_lt}} }
elasticsearch documentation has illustration replace string arrays , tried utilize same integer arrays , did not work.
so had utilize above provided in mustache templating examples.
thanks anil
arrays elasticsearch mustache
Comments
Post a Comment