I have few documents in a folder and I want to check if all the documents in this folder are indexed or not. To do so, for each document name in the folder, I would like to run through a loop for the documents indexed in ES and compare. So I want to retrieve all the documents.
There are few other possible duplicates of the same question like retrieve all records in a (ElasticSearch) NEST query and enter link description here but they didnt help me as the documentation has changed from that time.(there is nothing about scan in the current documentation)
I tried using client.search<T>() . But as per the documentation, a default number of 10 results are retrieved. I would like to get all the records without mentioning the size of records ? (Because the size of the index changes)
Or is it possible to get the size of the index first and then send this number as input to the size to get all the documents and loop through?
scroll, then uses the scroll id to get the first page of results. It then loops to get all documents, using the scroll id returned from the last response. You can also usefieldsin conjunction to get say only one field of the document back for each result, rather than returning the whole documentSearchType(Nest.SearchType.Scan)doesnt seems to be working. I had to useSearchType(Elasticsearch.Net.SearchType.Scan). After using the scrolls do I have to delete the scrolls or will they get cleared off after the mentioned time?