gpt4 book ai didi

elasticsearch - ElasticSearch无法从字符串转换为ElasticClient.searchRequestparameters

转载 作者:行者123 更新时间:2023-12-03 02:11:45 25 4
gpt4 key购买 nike

这是Json变量,此过滤器在kibana dashbaord中可以正常工作,这是enter image description here的屏幕截图
我的要求是,要使用从Elastic Search Dot net搜索请求中获得的过滤查询来获得与从Kibana获得的输出相同的输出,这是我从堆栈溢出到现在为止的链接。

                     {
""version"": true,
""size"": 500,
""sort"": [
{
""AddedOn"": {
""order"": ""desc"",
""unmapped_type"": ""boolean""
}
}
],
""stored_fields"": [
""*""
],
""script_fields"": { },
""docvalue_fields"": [
{
""field"": ""@timestamp"",
""format"": ""date_time""
},
{
""field"": ""AddedOn"",
""format"": ""date_time""
}
],
""_source"": {
""excludes"": []
},
""query"": {
""bool"": {
""must"": [],
""filter"": [
{
""match_all"": { }
},
{
""match_all"": { }
},
{
""bool"": {
""filter"": [
{
""match_all"": { }
},
{
""match_all"": { }
},
{
""range"": {
""AddedOn"": {
""format"": ""strict_date_optional_time"",
""gte"": ""2019-10-26T09:20:14.087Z"",
""lte"": ""2020-10-26T09:20:14.087Z""
}
}
}
],
""must"": [],
""must_not"": [],
""should"": []
}
},
{
""range"": {
""AddedOn"": {
""gte"": ""2019-10-26T10:38:34.169Z"",
""lte"": ""2020-10-26T10:38:34.170Z"",
""format"": ""strict_date_optional_time""
}
}
}
],
""should"": [],
""must_not"": []
}
},
""highlight"": {
""pre_tags"": [
""@kibana-highlighted-field@""
],
""post_tags"": [
""@/kibana-highlighted-field@""
],
""fields"": {
""*"": { }
},
""fragment_size"": 2147483647
}
}
"
这是在elasticsearch索引中进行搜索的代码
    _elasticClient.LowLevel.Search<SearchResponse<object>>(FraudIndex, "type", json4); >>> The errror i am getting is that cannot convert from string to ElasticClient.searchRequestparameters 

最佳答案

这是找到的解决方案

   var SearchResponse =await_elasticClient.LowLevel.SearchAsync<SearchResponse<object>>(FraudIndex, json4);

关于elasticsearch - ElasticSearch无法从字符串转换为ElasticClient.searchRequestparameters,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64537439/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com