We're using both the searching and percolator features within Elastic
Search. Due to having custom index settings and mappings which we always
want to ensure get set, we have both action.auto_create_index
and index.mapper.dynamic set to false, so that indexes and types only get
created when we explicitly do so, and with our settings and mappings.
However, we have discovered that the _percolator index has also picked up
these properties, and so we can no longer automatically create new
percolator mappings. This makes sense - it's just following the config -
but is undesirable. We could hard code the mapping (as stolen from
existing percolator mappings) in to our application and put it if it
doesn't exist, but we'd rather Elastic Search took care of it as it is
really part of it's internals, and I guess may change in the future?
Therefore, is there any way to explicitly set in the config file that we
want index.mapper.dynamic for the _percolotors index to be true? I
appreciate we could apply this to the index at runtime through the API, but
this requires us to remember to do it if and when we build a new cluster.
If we could put something in the config to ensure this is always the case
that'd be great. I've explored the pattern based while/black list
functionality, but it all seems to be based around the mapping name, not
the index name?
Hoping someone can shed some light on a possible solution here.
You can add a template for the _percolator index that would override the
setting. All you need to do is to create file
config/templates/percolator_template.json with the following content:
On Friday, April 19, 2013 11:21:46 AM UTC+2, Ollie wrote:
Hi,
We're using both the searching and percolator features within Elastic
Search. Due to having custom index settings and mappings which we always
want to ensure get set, we have both action.auto_create_index
and index.mapper.dynamic set to false, so that indexes and types only get
created when we explicitly do so, and with our settings and mappings.
However, we have discovered that the _percolator index has also picked up
these properties, and so we can no longer automatically create new
percolator mappings. This makes sense - it's just following the config -
but is undesirable. We could hard code the mapping (as stolen from
existing percolator mappings) in to our application and put it if it
doesn't exist, but we'd rather Elastic Search took care of it as it is
really part of it's internals, and I guess may change in the future?
Therefore, is there any way to explicitly set in the config file that we
want index.mapper.dynamic for the _percolotors index to be true? I
appreciate we could apply this to the index at runtime through the API, but
this requires us to remember to do it if and when we build a new cluster.
If we could put something in the config to ensure this is always the case
that'd be great. I've explored the pattern based while/black list
functionality, but it all seems to be based around the mapping name, not
the index name?
Hoping someone can shed some light on a possible solution here.
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.