Elasticsearch-如何在索引中的json格式化字段上查找特定元素

时间:2019-07-09 01:42:43

标签: elasticsearch

我有一个名为ave的索引,其中一个名为with(df1,+( match != 0 & ave(match, caseID, faculty, phase, FUN = function(x) length(unique(x))) == 2)) #[1] 1 0 0 1 0 0 的字段的数据类型为df1 <- structure(list(resident = structure(c(1L, 1L, 1L, 2L, 2L, 2L), .Label = c("george", "jane"), class = "factor"), faculty = structure(c(2L, 2L, 2L, 1L, 1L, 1L), .Label = c("carl", "sally"), class = "factor"), submittedBy = structure(c(2L, 4L, 2L, 3L, 1L, 1L), .Label = c("carl", "george", "jane", "sally"), class = "factor"), match = c(1L, 0L, 1L, 1L, 0L, 0L), caseID = structure(c(1L, 1L, 1L, 2L, 2L, 2L), .Label = c("george_1", "jane_1"), class = "factor"), phase = structure(c(2L, 2L, 1L, 2L, 2L, 1L), .Label = c("intra", "pre"), class = "factor")), class = "data.frame", row.names = c(NA, -6L)) –之所以如此,是因为我们已经从Mysql和现在正在尝试使用Elasticsearch。

web字段表示在Mysql阶段与另一个表的链接/联接数据(它显示csr记录有很多链接的string记录)

以下是使用Kibana的索引示例屏幕截图:

enter image description here

现在,我正在尝试做一个csr查询过滤器,以显示属于web特定范围的所有文档。例如,我要显示一个csr值范围为range的文档。但是,由于csr.csr_story_value字段中有多个json元素,因此我假设查询指出csr.csr_story_value字段中的最高值。这是一个示例屏幕截图:

enter image description here

主要问题

Elastcisearch中是否有一种方法可以在此4 to 5查询中插入csr查询,因此我可以专门匹配我的csrmatch以专门选择某个json该字段中的元素?

0 个答案:

没有答案