使用 ruby 过滤器的 Logstash,ElasticSearch id 是如何控制的?
Logstash using ruby filter, How are ElasticSearch id controll?
我使用 Java ElasticSearch api.
一次搜索,平均搜索结果 17,000,000 条数据
因此我的 ElasticSearch api 使用了滚动方式。
需要更新一次 ElasticSearch 数据。
并更新使用需求“_id”。
但是,搜索结果来源不包括'_id'。
然后我想到了一个办法!
"I want to use the Logstash Filter to include '_id' in the ElasticSearch Source."
但是,我不知道 ElasticSearch 源如何包含“_id”:( ...
帮帮我!
如果有其他方式,请告诉我。
您可以使用 SearchHit.getId()
在 Java API 中命中 _id
:https://static.javadoc.io/org.elasticsearch/elasticsearch/6.0.0/org/elasticsearch/search/SearchHit.html#getId--。
我使用 Java ElasticSearch api.
一次搜索,平均搜索结果 17,000,000 条数据
因此我的 ElasticSearch api 使用了滚动方式。
需要更新一次 ElasticSearch 数据。 并更新使用需求“_id”。 但是,搜索结果来源不包括'_id'。
然后我想到了一个办法!
"I want to use the Logstash Filter to include '_id' in the ElasticSearch Source."
但是,我不知道 ElasticSearch 源如何包含“_id”:( ...
帮帮我!
如果有其他方式,请告诉我。
您可以使用 SearchHit.getId()
在 Java API 中命中 _id
:https://static.javadoc.io/org.elasticsearch/elasticsearch/6.0.0/org/elasticsearch/search/SearchHit.html#getId--。