Hello elastic.co,
New user here, hence am learning the forum rules as well. Forum Admins, if this was asked previously, pardon me. I am an intermediate .Net C# programmer and novice ElasticSearch user.
Here is my issue:
From a .Net (C#) Console app, I need to (1) connect to an ES instance, (2) query a specific index, (3) pull ALL the docs from the index (which number about 10k - 12k per day, so there will be paging/scan/scroll used here) and (4) loop through each json doc and (5) search for a keyword in one or more of the key value pairs.
So, I simply need to pull down the source json data into a string and search through it. I need to keep doing this until I've cycled through all the docs in the index. I can successfully accomplish 1 - 3. **But I cannot get at the json data in step 4**. HOW DO I SIMPLY GET AT THE JSON DATA in the response object below?
var response = esClient.Search<Object>(s => s
.From(0) //starting from this initial doc
.Size(1000) //how many docs to bring back
.Index("sample_idx")
.Query(q => q.MatchAll())
.Scroll("60s") //scroll time(out)
);
I've tried response.Body (doesn't seem to exist in intellisense), response.Document.Any (also doesn't exist). response.hit in Hits ony seems to give me each key value in each json.
Any help (sample code) would greatly be appreciated. Thanks all!
prgmrESNet