🏠 Homepage
Vue portal to node/koa service for full-text searching elasticsearch/kibana indexed Gutenberg Project literary works.
Made with lots of ☕️ by sc0ttwad3
npm install
Use docker-compose.yaml
to spin up elasticsearch/kibanan with persistent storage and node app.
docker-compose up # down to tear down
First create an index for the books and verify it is listed as one of the indices:
λ curl -XPUT http://localhost:9200/books
{"acknowledged":true,"shards_acknowledged":true,"index":"books"}
λ curl -XGET http://localhost:9200/_cat/indices?
green open books plTl1SD0QUCRTvWOFLOLsw 1 1 0 0 460b 230b
The field mappings for book entries in book-mappings.json
:
{
"properties": {
"author": {
"type": "text",
"analyzer": "standard"
},
"text": {
"type": "text",
"analyzer": "english"
},
"title": {
"type": "text",
"analyzer": "standard",
"boost": 2
}
}
}
To create the elasticsearch index mappings:
$ curl -d "@book-mappings.json" -H 'Content-Type: application/json' -X PUT "localhost:9200/books/_mappings"
(or use kibana devtools to PUT /books/_mappings
and paste contents of book-mappings.json
npm run start
npm run test
👤 Scott Wade <sc0ttwad3@gmail.com> (http://sc0ttwad3.com)
- Website: sc0ttwad3.com
- Github: @sc0ttwad3
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2020 Scott Wade sc0ttwad3@gmail.com (http://sc0ttwad3.com).
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator