I need to Get the Length of a String datatype value and exclude the documents which have more than 4 characters using Elastic search custom query. I tried below query and didn't work. NO LUCK ! Could anyone help
Hi bhavyarm, Thanks for your reply. I am using this custom query inside KIBANA console.
Actually, I need to exclude values with 3 & 6 digits. and get results only with 4 digits value in my result set. I have also tried the below one and got the below as the output. Is there any other way to achieve this. The problem is the column is a String but contains 3,4,6 digit numbers
Thank you @bhavyarm and @LeeDr... Scripted Field worked for me. I did like the below script. One last Clarification. Can we filter based on Scripted Field? Only to have value.length() == 4
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.