
回复
访问 https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-10-1 下载安装包。
配置项network.host可以指定可以访问ES服务的主机,注释掉,或者指定为localhost,则只允许本地访问。
配置外网访问9200端口 需要开放服务器的端口:
索引可以理解为保存到数据库,可以使用cURL来演示如何索引一个文档Indexing a simple document using cURL。
执行如下命令来演示,其中id是数据编号,请求的URI为/tutorial/helloworld/1:
通过下面的地址在浏览器访问,可以查询数据:
再看一个例子:
搜索 find it by searching for “hello”:
搜索出来两个: