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

1 Like

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

Essentially,

  • 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

and

  • 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?

Regards

1 Like

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

Many thanks for your assistance.
Regards

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