Skip to content

Commit

Permalink
[Closes #55] Change create to index in the _bulk API call per some go…
Browse files Browse the repository at this point in the history
…od advice here http://stackoverflow.com/questions/34572878/elasticsearch-bulk-api-index-vs-create-update Using create is for strict creates and may fail if the doc already exists. Index is guaranteed to pass as ain upsert and ES decides.
  • Loading branch information
JP Toto committed Jan 13, 2016
1 parent 32a2969 commit dcf2318
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
log4net.ElasticSearch
=====================

[![NuGet Status](http://img.shields.io/badge/nuget-2.3.0-green.svg)](https://www.nuget.org/packages/log4net.ElasticSearch/)
[![NuGet Status](http://img.shields.io/badge/nuget-2.3.1-green.svg)](https://www.nuget.org/packages/log4net.ElasticSearch/)

[![Build status](https://ci.appveyor.com/api/projects/status/t877sp1e5eleye4n/branch/master)](https://ci.appveyor.com/project/jptoto/log4net-elasticsearch/branch/master)

Expand Down
2 changes: 1 addition & 1 deletion scripts/log4net.ElasticSearch.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>log4net.ElasticSearch</id>
<version>2.3.0</version>
<version>2.3.1</version>
<authors>JP Toto</authors>
<owners>JP Toto</owners>
<iconUrl>http://nest.azurewebsites.net/images/nuget-icon.png</iconUrl>
Expand Down
4 changes: 2 additions & 2 deletions src/log4net.ElasticSearch/AssemblyVersionInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Reflection;

[assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyFileVersion("2.3.0")]
[assembly: AssemblyVersion("2.3.1")]
[assembly: AssemblyFileVersion("2.3.1")]
2 changes: 1 addition & 1 deletion src/log4net.ElasticSearch/Infrastructure/HttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void PostBulk<T>(Uri uri, T items)
// index and type already specified in the Uri segments
foreach (var item in (IEnumerable<logEvent>)items)
{
postBody.AppendLine("{\"create\" : {} }");
postBody.AppendLine("{\"index\" : {} }");
postBody.AppendLine(item.ToJson());
}

Expand Down

0 comments on commit dcf2318

Please sign in to comment.