# While concatenating two large text field using scripted field, if string length are long not able to concatenate

**URL:** <https://discuss.elastic.co/t/while-concatenating-two-large-text-field-using-scripted-field-if-string-length-are-long-not-able-to-concatenate/227905>\
**Category:** Kibana\
**Tags:** painless\
**Created:** [April 14, 2020, 11:51am UTC](https://discuss.elastic.co/t/while-concatenating-two-large-text-field-using-scripted-field-if-string-length-are-long-not-able-to-concatenate/227905 "2020-04-14T11:51:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivek996](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek996/32/63505_2.png) [@vivek996](https://discuss.elastic.co/u/vivek996)\
**Post date:** [April 14, 2020, 11:51am UTC](https://discuss.elastic.co/t/while-concatenating-two-large-text-field-using-scripted-field-if-string-length-are-long-not-able-to-concatenate/227905/1 "2020-04-14T11:51:27Z")

</div>

Not able to concatenating two string fields in kibana using the painless script, having a very large string. My scripts are as follow :-:  
'''  
if (doc['ERROR'].size() != 0 && doc['ABORT'].size() != 0 && doc['FAIL'].size()!=0 && doc['STATUS 502'].size()!=0) {  
'\<\<\<Error'+doc['ERROR'].value+'\>\>\>\<\<Fail:'+doc['FAIL'].value+'\>\>\<\<Abort:'+doc['ABORT'].value+'\>\>\<\<\<STATUS 502:'+doc['STATUS 502'].value+'\>\>\>'  
}else{  
"No Desciption"  
}  
'''  
here Error field data is too long so in scripted field result not able to concatenate. and when i further investigate it doc['field'].size() return null value.

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [April 14, 2020, 10:24pm UTC](https://discuss.elastic.co/t/while-concatenating-two-large-text-field-using-scripted-field-if-string-length-are-long-not-able-to-concatenate/227905/2 "2020-04-14T22:24:38Z")

</div>

What's the error you're getting?

---

<div class="post-metadata">

**Author:** ![vivek996](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek996/32/63505_2.png) [@vivek996](https://discuss.elastic.co/u/vivek996)\
**Post date:** [April 15, 2020, 3:18am UTC](https://discuss.elastic.co/t/while-concatenating-two-large-text-field-using-scripted-field-if-string-length-are-long-not-able-to-concatenate/227905/3 "2020-04-15T03:18:55Z")

</div>

getting no error data is not loading in place of data it is showing else condition, Infact data is present there.  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 13, 2020, 3:19am UTC](https://discuss.elastic.co/t/while-concatenating-two-large-text-field-using-scripted-field-if-string-length-are-long-not-able-to-concatenate/227905/4 "2020-05-13T03:19:18Z")

</div>

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