Is there a way to retrieve all records in a (ElasticSearch) NEST query? [duplicate]

*爱你&永不变心* 提交于 2019-12-19 17:45:39

问题


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!


回答1:


This is a dup of Elasticsearch query to return all records. To use scan and scroll, look at the NEST documentation here.



来源:https://stackoverflow.com/questions/27955623/is-there-a-way-to-retrieve-all-records-in-a-elasticsearch-nest-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!