特性:
安装非常简单,http://www.elasticsearch.org/download/ 下载最新版本的Elasticsearch,其中zip包可直接解压使用。
启动:
./bin/elasticsearch
如果想在后台以守护进程模式运行,添加-d参数
curl 'http://localhost:9200/?pretty' 输出status为200表示启动成功。
查询索引结构:
curl 'http://192.168.3.216:9200/forum/user_member/_mapping'
{
"forum": {
"mappings": {
"user_member": {
"_all": {
"analyzer": "ik_max_word",
"search_analyzer": "ik_smart"
},
"properties": {
"follower": {
"type": "long"
},
"id": {
"type": "string"
},
"threads": {
"type": "long"
},
"uid": {
"type": "long"
},
"username": {
"type": "string",
"index": "not_analyzed",
"term_vector": "with_positions_offsets",
"include_in_all": false
},
"verify": {
"type": "long"
},
"wcuid": {
"type": "long"
}
}
}
}
}
}
使用步骤:
参考资料:
https://github.com/elasticsearch-cn/elasticsearch-definitive-guide
http://es.xiaoleilu.com/010_Intro/10_Installing_ES.html