I've configured the null_value of a field, as below. But when I do a query,
the documents that lack a barfield, don't return the value "0" for the
'barfield' as expected. What could be the reason?
The null_value is not used as a "default value", but as a value to used
when doing searching or aggregations.
For instance, in your mapping, your document will match if you have a
filter like this: ['term' => ['barfield' => 0]], however it won't return
the barfield property if it is null.
Ah, that explains it. Thx. How can I configure / simulate a default_value
for this field?
/AS
On Friday, February 6, 2015 at 4:41:01 PM UTC+1, Michaël Gallego wrote:
The null_value is not used as a "default value", but as a value to used
when doing searching or aggregations.
For instance, in your mapping, your document will match if you have a
filter like this: ['term' => ['barfield' => 0]], however it won't return
the barfield property if it is null.
I've configured the null_value of a field, as below. But when I do a query, the documents that lack a barfield, don't return the value "0" for the 'barfield' as expected. What could be the reason?
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.