我正在尝试使用match_all查询来查询 Elasticsearch 索引。
Uri uri = new Uri("http://10.10.10.67:9200");
ConnectionSettings connection = new ConnectionSettings(uri);
connection.SetDefaultIndex("leases");
int port = connection.Port;
ElasticClient client = new ElasticClient(connection);
var feeQueryObject = client.Search<FeeQueryResult>(s => s
.Type("leases").MatchAll());
凭感觉,我得到了结果,但没有得到NEST。
不确定是否必须正确设置映射类的模式在ElasticSearch文档中的样子? -我类只有几个属性,而不是全部。
关于为什么没有返回结果的任何想法?
最佳答案
这是我的错
类型不正确。应该是“费用”而不是“租赁”。
关于elasticsearch - NEST ElasticSearch,查询结果为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23661049/