java.lang.NoSuchMethodError: org.elasticsearch.action.index.IndexRequest.ifSeqNo()J


(Zyuxing) #1

在我使用elasticsearch-rest-high-level-client7.0版本连接elasticsearch7.0的时候使用官网提供的示例:
IndexRequest indexRequest = new IndexRequest("pubmed2","_doc","2").source(jsonMap);
var indexResponse = restHighLevelClient.index(indexRequest, RequestOptions.DEFAULT);
他发生java.lang.NoSuchMethodError: org.elasticsearch.action.index.IndexRequest.ifSeqNo()J错误,
模板已经建好:
{
"mapping": {
"properties": {
"id": {
"type": "integer"
}
}
}
}