diff --git a/readme.md b/readme.md index 932663afb83..36b0d1cb98c 100644 --- a/readme.md +++ b/readme.md @@ -97,19 +97,19 @@ var tweet = new Tweet Message = "Trying out NEST, so far so good?" }; -var response = client.Index(tweet); +var response = client.Index(tweet, idx => idx.Index("mytweetindex")); //or specify index via settings.DefaultIndex("mytweetindex"); ``` All the calls have async variants: ```csharp -var response = client.IndexAsync(tweet); // returns a Task +var response = client.IndexAsync(tweet, idx => idx.Index("mytweetindex")); // returns a Task ``` ### Getting a document ```csharp -var response = client.Get(1); // returns an IGetResponse mapped 1-to-1 with the Elasticsearch JSON response +var response = client.Get(1, idx => idx.Index("mytweetindex")); // returns an IGetResponse mapped 1-to-1 with the Elasticsearch JSON response var tweet = response.Source; // the original document ```