我正在使用 docker-compose ,如 github/davidefiocco/dockerized-elasticsearch-indexer/blob/master/docker-compose.yml 初始化容器化的Elasticsearch索引。 现在,我想为 indices.query.bool.max_clause_count 设置一个比使用 elasticsearch的默认设置更大的值.yml 配置文件(用于运行一些繁琐的查询,如 Elasticsearch -设置max_clause_count )。
到目前为止,我尝试在 docker-compose.yml 中添加以下卷:
服务: elasticsearch:数量:-./elasticsearch/config/elasticsearch.yml(及其变体)试图指向 elasticsearch.yml 文件(我想随文件的其余部分一起提供)具有正确的 max_clause_count 设置,但无济于事。
有人可以指出我正确的方向吗?
解决方案一种执行该(简单)修改的解决方法容器中的 elasticsearch.yml 是直接使用语法修改相关的Dockerfile
USER root RUN echo indices.query.bool.max_clause_count:1000000>> /usr/share/elasticsearch/config/elasticsearch.yml以便附加所需的自定义值。 / p>
I am using docker-compose as in github/davidefiocco/dockerized-elasticsearch-indexer/blob/master/docker-compose.yml to initialize a containerized elasticsearch index. Now, I would like to set a larger value for indices.query.bool.max_clause_count than the default setting using a elasticsearch.yml config file (this is to run some heavy queries as in Elasticsearch - set max_clause_count).
So far I tried to add in the docker-compose.yml a volume with:
services: elasticsearch: volumes: - ./elasticsearch/config/elasticsearch.yml(and variations thereof) trying to point to a elasticsearch.yml file (that I would like to ship with the rest of the files) with the right max_clause_count setting, but to no avail.
Can someone point me to the right direction?
解决方案One workaround to perform that (trivial) modification to elasticsearch.yml in the container is to modify directly a relevant Dockerfile with the syntax
USER root RUN echo "indices.query.bool.max_clause_count: 1000000" >> /usr/share/elasticsearch/config/elasticsearch.ymlso to append the desired custom value.
更多推荐
如何在Docker容器中的elasticsearch.yml中进行简单的编辑?
发布评论