简体   繁体   English

Elasticsearch 如何生成唯一的 _id 值?

[英]How Elasticsearch generate the unique _id value?

我只是不喜欢它的结果字符串的外观,我想知道该算法是否有某种库以便我可以在我自己的代码 (C#) 中使用。

See the answer to this question in the Elasticsearch discuss .请参阅Elasticsearch 讨论中这个问题的回答。

You can find the source code to the method linked there here .您可以在此处找到链接方法的源代码。

Elasticsearch is written in Java, so you won't be able to import this method into your c# project. Elasticsearch 是用 Java 编写的,因此您将无法将此方法导入到您的 c# 项目中。 Do you need the specific optimizations that the Elasticsearch-Team implemented in this method, or do you just need a general UUID library?您是否需要 Elasticsearch-Team 在此方法中实现的特定优化,或者您是否只需要一个通用的 UUID 库?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM