我正在尝试从弹性搜索存储库中检索记录。我的方法看起来像这样
def findPartialFieldWithId(id: String, path: String): Future[SearchResponse] = {
client.execute {
search in IndexType query {
termQuery("_id", id)
} sourceInclude (path)
}
}
但是如果id
是字符串列表而不是字符串,我应该使用什么 DSL?
尝试阅读 elastic4s 文档和测试用例,但仍然无法正常工作