我使用的是NEST lib,并根据文档进行了非常基本的设置。我已经添加了索引、映射等。
但当我尝试做搜索时,它总是给我,“一个具有相同关键字的项目已经被添加”。它让我对这个错误的含义感到非常困惑。
var result = client.Search<Contact>(s => s
.AllIndices()
.From(0)
.Size(10)
.Query(q => q
.MatchAll())
);这是联系方式:
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; }
}发布于 2015-05-14 03:53:26
你可能在elastic中有两次使用相同电子邮件地址的联系人。您是否可以将Email属性更改为字符串数组?
https://stackoverflow.com/questions/30201860
复制相似问题