有没有办法检索(ElasticSearch)NEST查询中的所有记录? [英] Is there a way to retrieve all records in a (ElasticSearch) NEST query?
本文介绍了有没有办法检索(ElasticSearch)NEST查询中的所有记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
var result = elasticClient.Search< SearchItemClass>(s => $
.Query(q = .Term(fieldName,term))))
);
默认情况下,这将返回10点击。
有没有办法可以得到所有的结果,没有指出.Size(value)或.Take(value)?
提前感谢
解决方案
这是弹性搜索查询返回所有记录。要使用扫描和滚动,请查看NEST文档 here 。
I'm doing this query in NEST
var result = elasticClient.Search<SearchItemClass>( s=>
s.Index("indexName")
.Type("typeName")
.Query(q => q.ConstantScore(score => score.Filter(f => f.Term("fieldName", "term"))))
);
And this will return 10 Hits by default.
Is there a way I can get ALL results, WITHOUT indicating .Size(value) or .Take(value)?
Thanks in advance!
解决方案
This is a dup of Elasticsearch query to return all records. To use scan and scroll, look at the NEST documentation here.
这篇关于有没有办法检索(ElasticSearch)NEST查询中的所有记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文