There seems to be a bug on term-filter when using it on "integer"-mapped
fields. The field "position" is mapped to "integer" and does not match to
term-filter. This is the mapping:
I replaced the "bool" filter with "and" filter, but the result is the same.
The same data was written to a different type within the ES index, but with
mapping of "string" instead of "integer". "string" and "long" always work
as expected, but the field mapped to "integer" never matches the term
query. There is no hint of such behavior in the ES manuals.
The affected "integer" fields take no effect for sorting. It looks like
store only, the result document contains values. But the field itself is
not searchable.
When creating index with mapping to "long" al lis fine. Does any one have
an idea?
The same data was written to a different type within the ES index, but
with mapping of "string" instead of "integer".
This is probably the source of the bug, Elasticsearch is still aware of
this mapping and tries to search your field as if it was a string field,
while it's actually encoded as an integer field. In general you should
avoid having the same field name mapped to different types in the same
index, this is something that does not work well.
The affected "integer" fields take no effect for sorting. It looks like
store only, the result document contains values. But the field itself is
not searchable.
When creating index with mapping to "long" al lis fine. Does any one have
an idea?
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.