简体   繁体   English

弹性NEST Automap()

[英]Elastic NEST Automap()

I am trying to create a new index in Elastic Cloud, and am trying to use the AutoMap functionality to generate the mapping for my products, I am wondering if someone who has done this can tell me how long this generally takes, my application has been running for over 90 mins consuming all my RAM and the index has not yet appeared on Elastic. 我试图在Elastic Cloud中创建新索引,并试图使用AutoMap功能为我的产品生成映射,我想知道这样做的人能否告诉我这通常需要多长时间?运行了90分钟以上,消耗了我的所有RAM,并且索引尚未出现在Elastic上。

can anyone offer any advice? 谁能提供任何建议?

var node = new SingleNodeConnectionPool(new Uri("https://elasticcloud:9243"));
var config = new ConnectionSettings(
                    node,
                    new HttpConnection());
var client = new ElasticClient(config);     
client.CreateIndex("sbproducts", i => i
                .Settings(s => s
                .NumberOfShards(2)
                .NumberOfReplicas(0)
                )
                .Mappings(ms => ms
                .Map<Data.Product>(m => m.AutoMap())
                )
                );
.Map<Data.Product>(m => m.AutoMap())

By default does not protect against circular references there is an overload that takes maxRecursion as an integer. 默认情况下,它不能防止循环引用,存在一个将 maxRecursion作为整数的重载。

UPDATE 更新

The default recursion is 0 which means it won't recurse into a type it has already seen. 默认递归为0 ,这意味着它将不会递归为已经看到的类型。 Any additional information you can give us on your type would be appreciated @rs82uk 您可以根据您的类型为我们提供的任何其他信息,@ rs82uk将不胜感激

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

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