我一直在尝试使用elastic包从 R 查询 elasticsearch 。
我能够查询和获取数据
`Search(index = "tmp_test_data",
q = "_type: random AND log.type: regular", size = 10000)`
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试size通过添加 body来增加
`body1 <- '{"settings" : {"index" : {"max_result_window" : "170000"}}}'`
Run Code Online (Sandbox Code Playgroud)
到搜索查询
`Search(index = "tmp_test_data",
q = "_type: random AND log.type: regular", body = body1)`
Run Code Online (Sandbox Code Playgroud)
它返回, Error: 400 - Unknown key for a START_OBJECT in [settings].
编辑:
我尝试from在search每次搜索时使用函数中的参数进行循环,该搜索size = 1000返回多达 10,000 条记录并Error: 500 - all shards failed在此之后抛出。
我还按照 R …