1.進入ES 目錄---啟動ES
elasticsearch.bat
2.cmd 進入head目錄---啟動head
npm start
頁面地址:http://127.0.0.1:9100/
3.ES創建索引
PUT http://127.0.0.1:9200/commodity
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 2
}
}
4.ES重建分詞
(1):重建索引-加mapping
PUT http://localhost:9200/fenci1/
{
"settings": {
"analysis": {
"analyzer": {
"es_std": {
"type": "standard",
"stopwords": "_english_"
}
}
}
}
}
(2):reindex
POST http://localhost:9200/_reindex/
{
"source": {
"index": "book_index"
},
"dest": {
"index": "fenci1"
}
}