How to get data in Painless script variable


(Chaitanya Nallapati) #1

Hi,

One of a field(url) stores 'url' information and I am trying to get it's value from painless script by doc['url.keyword'].value .Sometimes if the value is less then 100 characters it's getting but not for more than 100 characters.

What's the maximum length to get value in painless script variable and how to get field value if it's length exceeds.

I am using Kibana 5.1

Please advise.


(kulkarni) #2

Hi

As far as Painless script is concerned, there should be no limit. But I on't think this is directly a painless issue actually. Can you let us know know what your index settings/ field_mappings are, that would be helpful. Painless should be pulling over exactly what is in that field.

Thanks
Rashmi


(Chaitanya Nallapati) #3

Hi Rashmi,

Please see attached screen shot for fielmapping value.

Thanks,
Chaitanya.


(kulkarni) #4

Hi

Can you please return the results of a search for specifically that field with examples of both urls under 100 characters and urls over 100 characters. Without using painless do a search just use that as a return field. That would help to ensure the field is behaving as you believe it is. Let us know the results.

Thanks
Rashmi


(Chaitanya Nallapati) #5

Hi,

I tested with painless script and it's handling upto 256 characters.

If I holding url values, I can extract data from it. I think it's not possible in regular search.

Thanks,
Chaitanya.


(kulkarni) #6

So I'll move your post to ES forum. Some one can take a look there.

Thanks
Rashmi


(system) #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.