我有一个名为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的索引示例屏幕截图:
现在,我正在尝试做一个csr
查询过滤器,以显示属于web
特定范围的所有文档。例如,我要显示一个csr
值范围为range
的文档。但是,由于csr.csr_story_value
字段中有多个json元素,因此我假设查询指出csr.csr_story_value
字段中的最高值。这是一个示例屏幕截图:
主要问题
Elastcisearch中是否有一种方法可以在此4 to 5
查询中插入csr
查询,因此我可以专门匹配我的csr
和match
以专门选择某个json该字段中的元素?