I'm using NEST lib, and very basic setup according to the document. I've added index, mapping, etc.
But when I try to do search it always gives me, "An item with the same key has already been added". It confused me alot on what the error means.
var result = client.Search<Contact>(s => s
.AllIndices()
.From(0)
.Size(10)
.Query(q => q
.MatchAll())
);
Here is the Contact:
public class Contact
{
public Guid Id { get; set; }
public Guid TenantId { get; set; }
public string Title { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public DateTime ModifiedDate { get; set; }
public IList<string> Emails { get; set; }
}