Dav*_*cco 7 elasticsearch docker-compose
我docker-compose在https://github.com/davidefiocco/dockerized-elasticsearch-indexer/blob/master/docker-compose.yml 中使用as来初始化容器化弹性搜索索引。
现在,我想indices.query.bool.max_clause_count使用elasticsearch.yml配置文件设置一个比默认设置更大的值(这是为了像在Elasticsearch 中那样运行一些繁重的查询- set max_clause_count)。
到目前为止,我尝试添加docker-compose.yml一个卷:
services:
elasticsearch:
volumes:
- ./elasticsearch/config/elasticsearch.yml
Run Code Online (Sandbox Code Playgroud)
(及其变体)试图以elasticsearch.yml正确的max_clause_count设置指向一个文件(我想与其余文件一起提供),但无济于事。
有人可以指出我正确的方向吗?
您可以使用以下命令将包含 elasticsearch.yml 的主机目录挂载到容器中
services:
elasticsearch:
volumes:
- path_to/custom_elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
Run Code Online (Sandbox Code Playgroud)
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.yml
Run Code Online (Sandbox Code Playgroud)
so to append the desired custom value.
| 归档时间: |
|
| 查看次数: |
6763 次 |
| 最近记录: |