Elasticsearch: files conflicts (syn, stopwords) between different versions
agazzarini opened this issue · 1 comments
[ERROR] Failed to execute goal io.sease:rre-maven-elasticsearch-plugin:6.3.2:evaluate (default) on project search-configs: Execution default of goal io.sease:rre-maven-elasticsearch-plugin:6.3.2:evaluate failed: java.lang.IllegalArgumentException: IOException while reading stopwords_path: /tmp/config/en_stopwords.txt -> [Help 1] [ERROR]
The error above is caused by a situation when synonyms and stopwords are not hard-coded within the index shape but, throught the *_path attribute, are defined using external files.
Issue has been fixed: the Elasticsearch platform binding copies all the configuration files found in the config directory to a tmp path.home. On top of that:
-
each file is renamed using the owning version prefix, so if two versions uses the same filename (e.g. stopwords.txt) we don't have any collision.
-
the index-shape is rewritten in order to correctly reference the new renamed files (e.g. v1.5_stopwords.txt)