Long String retrieved as empty; short String retrieved fine; why ES?

I use this script to inspect data in various docs from ES.

{
"query": {
"match_all": {}
},
"sort": {
"_script": {
"script": "if(doc['site'].values.contains(12)){return
'foo'}else{return doc['dataX'].values }",
"type": "string",
"order": "desc"
}
}
}

The only important part of this script is that it will always go in the
else clause and print doc['dataX'].values

I also have this document JSON:
{
"doc":{
"site" : "gencoupe.com",
"name" : "amount-active-users",
"daily" : {
"dataX": "1000,490,390,600,300",
"dataY": "1388538061, 1388624461, 1388710861, 1388797261, 1388883661",
"startDate":1388538061,
"endDate":1388883661
}

}
}

I've noticed that if the string dataX is longer than 40 someting
characters, the script I presented retrieves dataX as an empty array. If
the strnig is 40 chars or less it works fine and retrieves the contents of
the String.

Is there a limit on how many char a String can store in ES? Why am I seeing
this inconsistent behaviour and how can I make it retrieve the entire
string, of potentially very large size?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/39a82d40-3381-4b1f-a5b4-96805b14e90a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Correction: I get somewhere around 220 characters in that String NOT 40-50
as I originally mentioned.

On Wednesday, 23 July 2014 15:36:10 UTC-4, Adrian wrote:

I use this script to inspect data in various docs from ES.

{
"query": {
"match_all": {}
},
"sort": {
"_script": {
"script": "if(doc['site'].values.contains(12)){return
'foo'}else{return doc['dataX'].values }",
"type": "string",
"order": "desc"
}
}
}

The only important part of this script is that it will always go in the
else clause and print doc['dataX'].values

I also have this document JSON:
{
"doc":{
"site" : "gencoupe.com",
"name" : "amount-active-users",
"daily" : {
"dataX": "1000,490,390,600,300",
"dataY": "1388538061, 1388624461, 1388710861, 1388797261, 1388883661",
"startDate":1388538061,
"endDate":1388883661
}

}
}

I've noticed that if the string dataX is longer than 40 someting
characters, the script I presented retrieves dataX as an empty array. If
the strnig is 40 chars or less it works fine and retrieves the contents of
the String.

Is there a limit on how many char a String can store in ES? Why am I
seeing this inconsistent behaviour and how can I make it retrieve the
entire string, of potentially very large size?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/045114fe-abfc-4144-8824-a6b312cd22cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.