Skip to content
(Relevancy) tests against the Stanford SearchWorks Solr Index, using rspec-solr and rsolr gems.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
spec
.gitignore
.rspec
Gemfile
Gemfile.lock
Jenkinsfile
LICENSE
README.rdoc
Rakefile

README.rdoc

SearchWorks Solr Index Tests

A ruby “application” for testing the Stanford University Libraries SearchWorks Solr index, using rspec-solr and rsolr gems.

The main reason this is in publicly accessible web space is to allow it to serve as an exemplar for folks who want to use rspec-solr or who want to figure out a way to automate testing searches against a Solr index.

Usage

If you wish to create a similar app for YOUR Solr index, you can fork this project or do something like the following:

Copy the following files:

  • Rakefile

  • Gemfile

  • spec/spec_helper.rb

Choose a way to pass your solr baseurl to the app

Use a command line argument:

rake passing URL=http://your_solr_baseurl

Use a config file

copy config/solr.yml from this project

If you wish to keep your solr url out of a remote git repo, you can do this:

git update-index --assume-unchanged config/solr.yml
NOTE: in spec/spec_helper.rb, line 10 or shows the default expected yml group is "test"

Write specs for YOUR Solr index!

There are lots of examples in the spec folder.

See rspec-solr Gem documentation for the full syntax. Documentation around here somewhere:

Contribute helper methods here or to rspec-solr.

Contributing

  1. Fork it

  2. Create your feature branch (`git checkout -b my-new-feature`)

  3. Commit your changes (`git commit -am 'Added some feature'`)

  4. Push to the branch (`git push origin my-new-feature`)

  5. Create new Pull Request

You can’t perform that action at this time.