【问题标题】:Validation of Elasticsearch query string in NEST C#在 NEST C# 中验证 Elasticsearch 查询字符串
【发布时间】:2019-12-18 15:38:48
【问题描述】:

我们正在从 Elasticsearch 5.6 迁移到 es 7.5。随着这次迁移,我们也在迁移 NEST 库。

在 5.6 中,我们使用这样的验证:

...

Nest.ElasticClient client = ...
Nest.QueryContainer query = ...

client.ValidateQuery<T>(v => v.Query(q => query));

但根据this document,所有验证查询的方法都已从 7.x 库中删除,并且没有关于在这种情况下如何使用 NEST 客户端的信息。

有什么方法可以使用Nest.ElasticClient 验证我们的查询吗?

【问题讨论】:

    标签: c# elasticsearch nest


    【解决方案1】:

    已移至Indices 部分客户端方法。

    client.Indices.ValidateQuery(..)
    

    希望对您有所帮助。

    【讨论】:

    • 这正是我所需要的。你拯救了我的一天;)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-05
    • 1970-01-01
    • 2021-11-15
    • 1970-01-01
    相关资源
    最近更新 更多