lucene/client/ruby/flare
Erik Hatcher 42ec4b2acc Fix issue with non-Rails environment from
require 'solr'

Reported by Ed Summers (edsu).



git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@492019 13f79535-47bb-0310-9956-ffa450edef68
2007-01-03 02:30:09 +00:00
..
app initial commit of Flare beginnings 2007-01-02 16:05:29 +00:00
config initial commit of Flare beginnings 2007-01-02 16:05:29 +00:00
db initial commit of Flare beginnings 2007-01-02 16:05:29 +00:00
doc add some of Rails generated directories 2007-01-02 16:13:28 +00:00
lib Fix issue with non-Rails environment from 2007-01-03 02:30:09 +00:00
public initial commit of Flare beginnings 2007-01-02 16:05:29 +00:00
script initial commit of Flare beginnings 2007-01-02 16:05:29 +00:00
solr remove index, let solr create it individually 2007-01-02 16:31:39 +00:00
test initial commit of Flare beginnings 2007-01-02 16:05:29 +00:00
README improve README 2007-01-02 18:25:02 +00:00
Rakefile initial commit of Flare beginnings 2007-01-02 16:05:29 +00:00

README

== Welcome to Solr Flare

Flare promises to expose the power of Solr as a Ruby  DSL (domain specific language). Integral to Flare will be a general purpose Rails-based presentation framework including faceted browsing, auto-suggest, folksonomy tagging/annotating, and much more.

  Visit the Solr Flare wiki for more information: http://wiki.apache.org/solr/Flare

== Getting started

Launch Solr:

  cd solr
  java -jar start.jar
  
In a separate shell, launch script/console.

Set up a connection to Solr:

  connection = Solr::Connection.new("http://localhost:8983")

To add a document:

  doc = {:id => "529", :text => "Solr Flare in Action"}
  request = Solr::AddDocumentRequest.new(doc)
  connection.send(request)

Commit changes:

  request = Solr::UpdateRequest.new("<commit/>")  # TODO: yes, this will be mapped as a simpler command!
  connection.send(request)

Search:

  request = Solr::StandardRequest.new  
  request.query = "solr flare"
  connection.send(request)