ElasticSearch
CentOS 7下安装部署Elasticsearch7.3.1
ElasticSearch 中文分词器 es-ik,Ansj,hanlp 对比
安装
下载地址: https://www.elastic.co/cn/downloads/elasticsearch es:a-80 groupadd esearch 创建esearch组 useradd -g esearch els 创建ela用户,并且加入ela组 passwd ela 为ela用户设定登录密码 vim /etc/sudoers) root ALL=(ALL) ALL ela ALL=(ALL) ALL chown es:esearch /home/es/data/ su es cd /usr/local/Elasticsearch/bin ./elasticsearch7 -d 后台运行模式 jps 查看后台进程 kill -9 终止后台运行 curl localhost:9200/ 查看所有索引 curl localhost:9200/_cat/indices 查看字段类型 curl localhost:9200/site_search/_mapping?pretty curl localhost:9200/site_search/_search?pretty'-d' { "from": 0, "size": 30, "_soruce": {"excludes": ["content']}, "query": { "filtered": { "filter": { "terms": ["_id": []]} }, "sort": {"published": {"order": "desc"}} } } curl -XPOST localhost:9200/site_search/_search?pretty -d ' { "from": 0, "size": 8, "_source": {"excludes": ["content"]}, "query": { "match_all": {}}, "sort": {"published": {"order": "desc"}} }' curl -XPOST localhost:9200/site_search/_search?pretty -d ' { "from": 0, "size": 8, "_source": {"excludes": ["content"]}, "query": { "filtered": { "filter": {"terms": {"_id": ["393871","393870"]}} } }, "sort": {"published": {"order": "desc"}} }'