【发布时间】:2020-06-25 05:03:51
【问题描述】:
Class Mail
{
public string MailID {get;set;}
[nested]
public List<Attachment> attachments {get;set;}
}
Class Attachment
{
public int AttachmentID {get;set;}
public string Data {get; set;}
[nested]
public Nest.attachment {get;set;}
}
上面是我的索引结构,其中 Ingest-Pipeline 数据已正确编入索引,但是当尝试搜索附件内容时,它会返回包含所有附件的空洞附件对象以及实际搜索附件。 在结果中我只想要搜索结果的附件
以下是我的查询
var response1 = elasticClient.Search<Mail>(s => s
.Index(indexName)
.Query(q =>
q.Match(mq => mq.Field("attachments.attachment.content").Query("b"))
));
【问题讨论】:
-
在映射中嵌套或对象的附件类型是什么?
-
它是一个嵌套对象
标签: elasticsearch indexing attachment elasticsearch.net