The nature of my keys is dynamic, it may include any id number. The problem of just adding these documents is to inflate my mapping schema with a very large number of different keys. I tried to use dynamic templates but I had the same problem.
Is possible to add those fields to my documents, keep them searchable but without having them on mappings?
Hey @warkolm, thank you for the reply. I tried to do it before, but with dynamic templates , I still have all the keys in mapping schema. For the dynamic template you suggested, after indexing my documents, I got it:
Indexing all this data on Elasticsearch but without flooding my mapping schema with a lot of keys/fields. In Solr, for instance, I could create a dynamic field loc_*: float without having each possible key value in my schema. I would like to have something like this.
I have total control over the indexing, so I can represent keys differently if necessary.
It could be. What I need is to have these 'dynamic fields' in my documents, to boost by their values in queries or to filter by these keys. However, I want to have them mapped to only one field (or one field pattern) in mappings.
Well you can set one definition in the template, but ES will still keep all the individual fields in the mappings irrespectively. You cannot change this.
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.