Skip to content

Commit

Permalink
fix #289 errors in multisearch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Jul 26, 2013
1 parent 8b79505 commit fbceb41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Nest/Resolvers/Converters/MultiSearchConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ private static void CreateMultiHit<T>(MultiHitTuple tuple, JsonSerializer serial
var reader = tuple.Hit.CreateReader();
serializer.Populate(reader, hit);

var errorProperty = tuple.Hit.Children<JProperty>().FirstOrDefault(c=>c.Name == "error");
if (errorProperty != null)
{
hit.IsValid = false;
hit.ConnectionStatus = new ConnectionStatus(new ConnectionError(errorProperty.Value.ToString(), 500));
}

collection.Add(tuple.Descriptor.Key, hit);

}
Expand Down

0 comments on commit fbceb41

Please sign in to comment.