You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
</code></pre><h2id="handling-the-multi-search-response">Handling the Multi Search Response</h2>
29
29
<p><code>MultiSearch</code> returns an <code>IMultiSearchResponse</code> object. Each <code>SearchResponse<T></code> can be retrieved using the corresponding name that was specified in the request.</p>
30
30
<pre><code>// returns a SearchResponse<ElasticsearchProject>>
31
-
var projects = result.GetResponse<ElasticsearchProject>("esproj");
31
+
var projects = result.GetResponse<ElasticsearchProject>("projects");
32
32
33
33
// returns a SearchResponse<Person>>
34
34
var people = result.GetResponse<Person>("people");
Copy file name to clipboardExpand all lines: docs/contents/nest/core/multi-search.markdown
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The multi search API allows to execute several search requests within the same A
13
13
### Fluent Syntax
14
14
15
15
var result = client.MultiSearch(ms => ms
16
-
.Search<ElasticsearchProject>("esproj", s => s.MatchAll())
16
+
.Search<ElasticsearchProject>("projects", s => s.MatchAll())
17
17
.Search<Person>("people", s => s.MatchAll())
18
18
);
19
19
@@ -24,12 +24,12 @@ The multi search API allows to execute several search requests within the same A
24
24
{
25
25
Operations = new Dictionary<string, ISearchRequest>
26
26
{
27
-
{ "esproj", new SearchRequest
27
+
{ "projects", new SearchRequest<ElasticsearchProject>
28
28
{
29
29
Query = new QueryContainer(new MatchAllQuery())
30
30
}
31
31
},
32
-
{ "people", new SearchRequest
32
+
{ "people", new SearchRequest<Person>
33
33
{
34
34
Query = new QueryContainer(new MatchAllQuery())
35
35
}
@@ -44,7 +44,7 @@ The multi search API allows to execute several search requests within the same A
44
44
`MultiSearch` returns an `IMultiSearchResponse` object. Each `SearchResponse<T>` can be retrieved using the corresponding name that was specified in the request.
45
45
46
46
// returns a SearchResponse<ElasticsearchProject>>
47
-
var projects = result.GetResponse<ElasticsearchProject>("esproj");
47
+
var projects = result.GetResponse<ElasticsearchProject>("projects");
48
48
49
49
// returns a SearchResponse<Person>>
50
50
var people = result.GetResponse<Person>("people");
"Property {0} on type {1} has an ElasticProperty attribute but its FieldType (Type = ) can not be inferred and is not set explicitly while calling MapFromAttributes";
0 commit comments