安装go-elasticsearch,gormgo get -u github.com/jinzhu/gormgo get github.com/elastic/go-elasticsearch/v7我的是v7版本,所以elasticsearch使用v7,如果是v8则改成v8go-elasticsearch和gorm操作func
源码安装方法useradd eswget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.2.2-linux-x86_64.tar.gzchown es -R /es/su estar -xzf elasticse