Vycka / ElasticSearch.Client

User-Friendly ElasticSearch c# client for Selecting and Aggregating data queries.
GNU General Public License v2.0
10 stars 1 forks source link

..Again.. #4

Closed skind closed 8 years ago

skind commented 9 years ago

..everything is working perfect - but now a simple question/task occured: Is it possible with your Lib (and how to do) to retrieve the whole 'dataset' when querying against a unique Id? Thank you very much for answering! skind

Vycka commented 9 years ago

Hey, what do you mean by whole dataset? Maybe an example?

skind commented 9 years ago

thankx for fast responding. Let's compare it with a simple database with one table. The 'dataset' is a complete row (all columns). This is colloquially known as a dataset in Germany. I hope this helps. Best regards, skind

Vycka commented 9 years ago

I assume, you know, how to build a filtered query for those concrete records you want, but instead of executing it as aggregate query, you execute it as normal query: client.ExecuteQuery(queryBuilder);

https://github.com/Vycka/ElasticSearch.Client/blob/master/src/ElasticSearch.Playground/Samples/Term.cs By default, results will be filled into dynamic structure [ public class ElasticSearchResult : SearchResult ]

But you can also do ExecuteQuery<TResult>(queryBuilder), and provide your custom made model and and it should fit like a glove (thx to newton json)

skind commented 9 years ago

..ohh damn, now it works - excuse me, i forgot to Switch from client.ExecuteAggregate to client.ExecuteQuery. Best Regards, skind