Skip to content

Commit 1a17a17

Browse files
committed
Merge pull request #1835 from rdehuyss/master
Updated documentation
2 parents 931828f + f67c819 commit 1a17a17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ var tweet = new Tweet
9797
Message = "Trying out NEST, so far so good?"
9898
};
9999

100-
var response = client.Index(tweet);
100+
var response = client.Index(tweet, idx => idx.Index("mytweetindex")); //or specify index via settings.DefaultIndex("mytweetindex");
101101
```
102102

103103
All the calls have async variants:
104104

105105
```csharp
106-
var response = client.IndexAsync(tweet); // returns a Task<IndexResponse>
106+
var response = client.IndexAsync(tweet, idx => idx.Index("mytweetindex")); // returns a Task<IndexResponse>
107107
```
108108

109109
### Getting a document
110110

111111
```csharp
112-
var response = client.Get<Tweet>(1); // returns an IGetResponse mapped 1-to-1 with the Elasticsearch JSON response
112+
var response = client.Get<Tweet>(1, idx => idx.Index("mytweetindex")); // returns an IGetResponse mapped 1-to-1 with the Elasticsearch JSON response
113113
var tweet = response.Source; // the original document
114114
```
115115

0 commit comments

Comments
 (0)