I have some documents, where a given field can have one or several values (strings or numerical, not mixed though) and I wanted to know if it's possible to operate these, like count the number of values of one type
It looks something like this when I go to discovery:
Thanks for the reply.
I am stuck in the script, when I try to get the list.
I've tried .size() or .length to check the number of elements, but I always get 1 instead of the correct value.
I've seen that ._source could also be used, but haven't managed either ...
Is this what you meant or what should I better go for?
(I've read that painless is not good for accessing nested documents, is this correct, should I better, reformat my documents ?)
I don't know why it doesn't work,
I tried with a dummy array of (apparently) the same characteristics and it worked, but with the real one, couldn't manage.
Anyway, I had to change the format of the documents, since I also needed to tabulate some of those results and with this structure it was getting over complicated for the display...
Thanks anyway for the support!
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.