Hi.
We want to embed ElasticSearch and needs to read configuration files,
config/mappings/_default and other, from classpath instead of file
system. Is it possible to load the files from alternative locations?
BR,
Sten Roger
Hi.
We want to embed ElasticSearch and needs to read configuration files,
config/mappings/_default and other, from classpath instead of file
system. Is it possible to load the files from alternative locations?
BR,
Sten Roger
Not sure if there is an easier way. But mapping can be updated via api
and settings too
I wouldn't recommend to have it in classpath because you always need a
new deployment for a tiny config change...
On 6 Okt., 11:58, Sten Roger Sandvik ste...@gmail.com wrote:
Hi.
We want to embed Elasticsearch and needs to read configuration files,
config/mappings/_default and other, from classpath instead of file
system. Is it possible to load the files from alternative locations?BR,
Sten Roger
Here is the logic to resolve config files:
https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/env/Environment.java#L163.
So, you can place the files within the classpath using the same path, and
they will be loaded. It all works well, btw, up until the point where files
needs to be listed, and then you can't do it from the classpath (like custom
mappings under an index directory).
You can, also, use the APIs to control what mappings you want to
use. Preferably on the create index API.
On Thu, Oct 6, 2011 at 11:58 AM, Sten Roger Sandvik stenrs@gmail.comwrote:
Hi.
We want to embed Elasticsearch and needs to read configuration files,
config/mappings/_default and other, from classpath instead of file
system. Is it possible to load the files from alternative locations?BR,
Sten Roger
© 2020. All Rights Reserved - Elasticsearch
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.