我试过在 elasticsearch.yaml 文件中给出以下配置
network.host: aa.bbb.ccc.dd 那是我的 IPv4 地址和 http.port: 9200
当我尝试在我的 Windows 机器上运行 elasticsearch.bat 时,对此的响应如下:
the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
我真的不太确定为集群初始化配置什么。默认值为 discovery.seed_hosts: ["host1", "host2"]和cluster.initial_master_nodes: ["node-1", "node-2"]
我正在尝试在 ElasticSearch 服务器上做一个简单的搜索并得到以下错误
ElasticsearchStatusException[Elasticsearch exception [type=illegal_argument_exception, reason=request [/recordlist1/_search] contains unrecognized parameter: [ccs_minimize_roundtrips]]]
Run Code Online (Sandbox Code Playgroud)
查询字符串:
{"query":{"match_all":{"boost":1.0}}}
我正在使用:elasticsearch-rest-high-level-client(maven artifact)
SearchRequest searchRequest = new SearchRequest(INDEX);
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(QueryBuilders.matchAllQuery());
searchRequest.source(searchSourceBuilder);
try
{
System.out.print(searchRequest.source());
SearchResponse response = getConnection().search(searchRequest,RequestOptions.DEFAULT);
SearchHit[] results=response.getHits().getHits();
for(SearchHit hit : results)
{
String sourceAsString = hit.getSourceAsString();
System.out.println( gson.fromJson(sourceAsString, Record.class).year);
}
}
catch(ElasticsearchException e)
{
e.getDetailedMessage();
e.printStackTrace();
}
catch (java.io.IOException ex)
{
ex.getLocalizedMessage();
ex.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud) 我使用的是Elasticsearch v7.10,在 javadoc 中,是以下界面
但不是以下两个类:
我不是在寻找这些类的作用的描述,只是想知道RestClient和RestHighLevelClient是否在v7.10 (当前版本)中已被弃用?
谢谢
问题:
自从从 ES-5.4 升级到 ES-7.2 后,当我尝试从我的多线程 Java 应用程序(使用elasticsearch-rest-high-level-client-7.2.0.jarjava 客户端)写入并发批量请求(或/和搜索请求)时,我开始收到“数据太大”错误到 2-4 个节点的 ES 集群。
我的ES配置:
Elasticsearch version: 7.2
custom configuration in elasticsearch.yml:
thread_pool.search.queue_size = 20000
thread_pool.write.queue_size = 500
I use only the default 7.x circuit-breaker values, such as:
indices.breaker.total.limit = 95%
indices.breaker.total.use_real_memory = true
network.breaker.inflight_requests.limit = 100%
network.breaker.inflight_requests.overhead = 2
Run Code Online (Sandbox Code Playgroud)
来自 elasticsearch.log 的错误:
{
"error": {
"root_cause": [
{
"type": "circuit_breaking_exception",
"reason": "[parent] Data too large, data for [<http_request>] would be [3144831050/2.9gb], which is larger than the limit of …Run Code Online (Sandbox Code Playgroud) 将elasticsearch升级到7.17.3,遇到错误Cannot resolve symbol 'XContentType'
“XContentType”是否已弃用?它的替代方案是什么?
我正在尝试基于我的文档中的字符串数组构建一个建议器,它与这个类似,但有几个不同之处:completion suggester来自 Elasticsearch 的并不是我想要的(在过滤和前缀匹配方面),因为我需要一个边缘 ngram 可以处理句子中的任何单词,重音不敏感。让我用一个例子来澄清。
假设我有以下索引文档。我想根据查询建议“标签” q(我不关心文档本身,只关心tag与我的查询匹配的s)
[
{ "tags": [ "société générale", "consulting" ] },
{ "tags": [ "big data", "big", "data"] },
{ "tags": [ "data" ] },
{ "tags": [ "data engineering" ] }
{ "tags": [ "consulting and management of IT" ] }
]
Run Code Online (Sandbox Code Playgroud)
我想将前缀与重音容差相匹配,以下查询/响应突出显示了我需要的内容
q = "societe"orq = "societe generale"应该返回[ "société générale" ]--> 重音不敏感q = "big data"应该返回[ …我一直在研究ELK Stack,遇到了一个小问题。
我已经阅读了所有可能的文档,它非常强调分片和副本的重要性。但没有地方说如何配置每一个的数量。我读过一些网站说最好将其保留为自动,而其他网站则说如何在 5.8 版本中配置它,但不再有效。
因此,如果有人可以向我解释,我将非常感激。
cluster-computing elasticsearch elastic-stack elk elasticsearch-7
我正在发布到我即将创建的 Elasticsearch 服务,但无法发布映射。我无法确定哪个部分不受支持。有什么建议么?
{
"mappings": {
"employees": {
"properties": {
"FirstName": {
"type": "text"
},
"LastName": {
"type": "text"
},
"Designation": {
"type": "text"
},
"Salary": {
"type": "integer"
},
"DateOfJoining": {
"type": "date",
"format": "yyyy-MM-dd"
},
"Address": {
"type": "text"
},
"Gender": {
"type": "text"
},
"Age": {
"type": "integer"
},
"MaritalStatus": {
"type": "text"
},
"Interests": {
"type": "text"
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我一直收到此错误返回。
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has …Run Code Online (Sandbox Code Playgroud) 我使用 docker-compose 来运行 ELKB。我的主要目标是启动elasticsearch 和logstash 容器。Logstash容器应该成功与elasticsearch连接,并将日志传递给elasticsearch进行进一步的搜索或处理。
但在不知不觉中原因logstash容器应该频繁停止。我需要保留在logstash和elasticsearch容器中,但它没有发生。
我不知道是什么原因导致logstash容器反复关闭。
我使用elasticsearch:7.6.3和logstash:7.6.3
请检查下面的代码并指导我在哪里犯了错误。
docker-compose.yml
# Docker version 19.03.5
# docker-compose version 1.25.3
version: "3.7"
services:
elasticsearch:
container_name: elasticsearch
build:
context: ./elasticsearch
dockerfile: Dockerfile
ports:
- 9200:9200
- 9300:9300
volumes:
- ./elasticsearch/data:/usr/share/elasticsearch/data:rw
- ./elasticsearch/logs:/usr/share/elasticsearch/logs:rw
restart: always
ulimits:
memlock:
soft: -1
hard: -1
networks:
- elkb
logstash:
container_name: logstash
build:
context: ./logstash
dockerfile: Dockerfile
ports:
- 9600:9600
- 5000:5000/udp
- 5000:5000/tcp
volumes:
- ./logstash/input-logs:/usr/share/logstash/logs
- ./logstash/data:/var/lib/logstash:rw
- ./logstash/logs:/var/logs/logstash:rw
restart: always
ulimits:
memlock:
soft: -1
hard: …Run Code Online (Sandbox Code Playgroud) docker docker-compose logstash-configuration elasticsearch-7
我最近从 Elasticsearch 6 升级到 7,偶然发现了 10000 次点击限制。
Changelog, Documentation, and I also found a single blog post from a company that tried this new feature and measured their performance gains.
But I'm still not sure how and why this feature works. Or does it only improve performance under special circumstances?
Especially when sorting is involved, I can't get my head around it. Because (at least in my world) when sorting a collection you have to visit every document, …