- Create empty index:
curl -XPUT 'localhost:9200/en_wikipedia/'
- Close the index:
curl -XPOST 'localhost:9200/en_wikipedia/_close'
- Add mapping:
curl -XPUT 'http://localhost:9200/en_wikipedia/_mapping/article' -d ' {
"properties": {
"text": {
"type": "string",
"fields": {
"en": {
"type": "string",
"analyzer": "english"
}
}
},
"title": {
"type": "string",
"fields": {
"en": {
"type": "string",
"analyzer": "english"
}
}
}
}
}'
- Open index:
curl -XPOST 'localhost:9200/en_wikipedia/_open'
- Create alias for index:
curl -XPUT 'localhost:9200/wikipedia/_alias/elastic-showcase'
- Load wikipedia data with the following command:
java -Djdk.xml.totalEntitySizeLimit=2147480000 -jar ./stream2es wiki --target http://localhost:9200/wikipedia --log debug --source /Users/michaelta/Downloads/enwiki-latest-pages-articles.xml.bz2