searchkick example for Synonyms, Suggestions, Aggregations, Highlight
bundle install
bundle exec rake db:migrate
bundle exec rake db:seed
vime config/initializers/elasticsearch.rb #setting elasticsearch host
rails server
visit locolhost:3000
gem searchkick Demo
searchkick example for Synonyms, Suggestions, Aggregations, Highlight
bundle install
bundle exec rake db:migrate
bundle exec rake db:seed
vime config/initializers/elasticsearch.rb #setting elasticsearch host
rails server
visit locolhost:3000
大大您好,我在您的網誌看到了您用Docker部署elasticsearch + searchkick + rails,想問您是否保留先前的docker-compose.yml
file,想要參考看看,我目前裝起來一直噴Failed to open TCP connection to localhost:9200
這個錯,也照網誌的說法用network把web(rails)、db(pg)、elasticsearch連起來了,但無濟於事。
目前curl 172.0.0.1:9200都是正常的。
以下是我的docker-compose內容:
version: '3'
services:
db:
image: postgres
volumes:
- .:/ruby_practice/db
web:
build: .
command: rails server -p 5000 -b 0.0.0.0
volumes:
- .:/ruby_practice
ports:
- "5000:5000"
links:
- db
- elasticsearch
depends_on:
- db
- elasticsearch
networks:
- app-tier
elasticsearch:
image: elasticsearch
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch"
- network.host=0.0.0.0
- network.bind_host="0"
- network.bind_host="::"
- discovery.type=single-node
- cluster.name=elasticsearch
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
networks:
- app-tier
kibana:
image: kibana
links:
- elasticsearch
ports:
- 5601:5601
networks:
- app-tier
networks:
app-tier:
非常謝謝你看完!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.