NEST syntax for Multi Search queries

Can anyone assist us with the syntax of how a Multi Search Query is created in NEST 7.
(This is getting a pain having to ask for NEST syntax everytime!)
Many thanks

Take a look at the MultiSearchApiTests for an example with the object initializer and fluent API syntaxes.


  • Object initializer syntax expects multiple searches to be supplied as a Dictionary<string, ISearchRequest>, where the key is some name that you provide for the request


  • Fluent API syntax supplies multiple search requests by chaining calls to .Search<T>(string name, Func<SearchDescriptor<T>, ISearchRequest>)

Responses are then reference on the MultiSearchResponse using the key/name provided on the request.

Thanks for the reply.
Are there any actual concrete examples anywhere for us to try and learn how rto do it?


There aren't any long form documentation examples currently. This stackoverflow answer may also help

Many thanks for your assistance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.