8000 GitHub - willfults/elasticsearch: Baisc Elastic Search Demo
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

willfults/elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Do the following to get this working... ==Install ElasticSearch== On Mac - use homebrew brew install elasticsearch elasticsearch -f -D es.config=/usr/local/Cellar/elasticsearch/0.18.5/config/elasticsearch.yml

==On Windows== Grab the installer here... https://github.com/rgl/elasticsearch-setup/downloads

you must restart your computer on windows... Access here to make sure it is working after the restart... http://localhost:9200/

==Then run the following commands...==

bundle rake db:setup start your server

Requires Ruby 1.9.2 or later to run.

== For the most basic usage of elasticsearch do the following==

controller....add code... Article.search(params)

model.... include Tire::Model::Search include Tire::Model::Callbacks

def self.search(params) tire.search(load: true) do query { string params[:query], default_operator: "AND" } if params[:query].present? end end

view... <%= form_tag articles_path, method: :get do %>

<%= text_field_tag :query, params[:query] %> <%= submit_tag "Search", name: nil %>

<% end %>

About

Baisc Elastic Search Demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0