这是我在R中为虹膜数据编制索引的代码。
library(elastic)
iris<-datasets::iris
body <- list(data = list(iris))
index_create(index = 'iris',body = body)
但它给出以下错误。
Error: 400 - Failed to parse content to map.
Please explain how to give data in the body of the index_create();
最佳答案
elastic
维护者在这里。 index_create
仅用于如函数名所示创建索引。也就是说,创建索引,而不是创建索引并将数据插入索引中。从您的示例中,您可能想要
index_create(index = "iris")
docs_bulk(iris, "iris")
关于r - 如何在R中的弹性包中使用index_create()为数据建立索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47096215/