Skip to content

Commit ffae024

Browse files
committed
[Docs] Update MultiSearch OIS example
1 parent 7398541 commit ffae024

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/build/nest/core/multi-search.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
<p>The multi search API allows to execute several search requests within the same API.</p>
44
<h3 id="fluent-syntax">Fluent Syntax</h3>
55
<pre><code>var result = client.MultiSearch(ms =&gt; ms
6-
.Search&lt;ElasticsearchProject&gt;(&quot;esproj&quot;, s =&gt; s.MatchAll())
6+
.Search&lt;ElasticsearchProject&gt;(&quot;projects&quot;, s =&gt; s.MatchAll())
77
.Search&lt;Person&gt;(&quot;people&quot;, s =&gt; s.MatchAll())
88
);
99
</code></pre><h3 id="object-initializer-syntax">Object Initializer Syntax</h3>
1010
<pre><code>var request = new MultiSearchRequest
1111
{
1212
Operations = new Dictionary&lt;string, ISearchRequest&gt;
1313
{
14-
{ &quot;esproj&quot;, new SearchRequest
14+
{ &quot;projects&quot;, new SearchRequest&lt;ElasticsearchProject&gt;
1515
{
1616
Query = new QueryContainer(new MatchAllQuery())
1717
}
1818
},
19-
{ &quot;people&quot;, new SearchRequest
19+
{ &quot;people&quot;, new SearchRequest&lt;Person&gt;
2020
{
2121
Query = new QueryContainer(new MatchAllQuery())
2222
}
@@ -28,7 +28,7 @@ <h3 id="fluent-syntax">Fluent Syntax</h3>
2828
</code></pre><h2 id="handling-the-multi-search-response">Handling the Multi Search Response</h2>
2929
<p><code>MultiSearch</code> returns an <code>IMultiSearchResponse</code> object. Each <code>SearchResponse&lt;T&gt;</code> can be retrieved using the corresponding name that was specified in the request.</p>
3030
<pre><code>// returns a SearchResponse&lt;ElasticsearchProject&gt;&gt;
31-
var projects = result.GetResponse&lt;ElasticsearchProject&gt;(&quot;esproj&quot;);
31+
var projects = result.GetResponse&lt;ElasticsearchProject&gt;(&quot;projects&quot;);
3232

3333
// returns a SearchResponse&lt;Person&gt;&gt;
3434
var people = result.GetResponse&lt;Person&gt;(&quot;people&quot;);

docs/contents/nest/core/multi-search.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The multi search API allows to execute several search requests within the same A
1313
### Fluent Syntax
1414

1515
var result = client.MultiSearch(ms => ms
16-
.Search<ElasticsearchProject>("esproj", s => s.MatchAll())
16+
.Search<ElasticsearchProject>("projects", s => s.MatchAll())
1717
.Search<Person>("people", s => s.MatchAll())
1818
);
1919

@@ -24,12 +24,12 @@ The multi search API allows to execute several search requests within the same A
2424
{
2525
Operations = new Dictionary<string, ISearchRequest>
2626
{
27-
{ "esproj", new SearchRequest
27+
{ "projects", new SearchRequest<ElasticsearchProject>
2828
{
2929
Query = new QueryContainer(new MatchAllQuery())
3030
}
3131
},
32-
{ "people", new SearchRequest
32+
{ "people", new SearchRequest<Person>
3333
{
3434
Query = new QueryContainer(new MatchAllQuery())
3535
}
@@ -44,7 +44,7 @@ The multi search API allows to execute several search requests within the same A
4444
`MultiSearch` returns an `IMultiSearchResponse` object. Each `SearchResponse<T>` can be retrieved using the corresponding name that was specified in the request.
4545

4646
// returns a SearchResponse<ElasticsearchProject>>
47-
var projects = result.GetResponse<ElasticsearchProject>("esproj");
47+
var projects = result.GetResponse<ElasticsearchProject>("projects");
4848

4949
// returns a SearchResponse<Person>>
5050
var people = result.GetResponse<Person>("people");

0 commit comments

Comments
 (0)