在Kibana中,我使用UserId:1 KQL并获得一些记录。2我想从项目中获取这些记录。3我的代码是:
KeyValuePair<string, string> sorts = new("Id", "asc"); var elasticResult = _elasticsearchService.Search<TEST>("UserId=1", 0, 50, sorts, "index").Result;
elasticResult.Item1使用以下代码返回-1值
rta7y2nd1#
您正在尝试将KQL查询用作ElasticSearch查询。UserId:1 KQL查询可能大致对应于ElasticSearch中的term查询(ElasticSearchdocs,可能是您的库的docs)
UserId:1
term
1条答案
按热度按时间rta7y2nd1#
您正在尝试将KQL查询用作ElasticSearch查询。
UserId:1
KQL查询可能大致对应于ElasticSearch中的term
查询(ElasticSearchdocs,可能是您的库的docs)