All Projects → cbeer → solr_wrapper

cbeer / solr_wrapper

Licence: MIT license
Wrap your tests with Solr 5+

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to solr wrapper

goobi-viewer-core
Goobi viewer - Presentation software for digital libraries, museums, archives and galleries. Open Source.
Stars: ✭ 18 (-18.18%)
Mutual labels:  solr
ruby-dns-mock
DNS mock server written on 💎 Ruby. Mimic any DNS records for your test environment with fake DNS server.
Stars: ✭ 50 (+127.27%)
Mutual labels:  rspec
capybara-chromedriver-logger
Enables console.log/error/info output from Javascript feature specs running with Chromedriver
Stars: ✭ 54 (+145.45%)
Mutual labels:  rspec
solrdump
Export SOLR documents efficiently with cursors.
Stars: ✭ 33 (+50%)
Mutual labels:  solr
solr
Apache Solr open-source search software
Stars: ✭ 651 (+2859.09%)
Mutual labels:  solr
clojureranker
Tune Solr-rankings with Clojure code.
Stars: ✭ 13 (-40.91%)
Mutual labels:  solr
query-segmenter
Solr Query Segmenter for structuring unstructured queries
Stars: ✭ 21 (-4.55%)
Mutual labels:  solr
serverspec-extended-types
A set of extended types for ServerSpec 2.x
Stars: ✭ 28 (+27.27%)
Mutual labels:  rspec
sophie
A Solr browser and administration tool
Stars: ✭ 28 (+27.27%)
Mutual labels:  solr
house style
A shared house style for Ruby projects
Stars: ✭ 19 (-13.64%)
Mutual labels:  rspec
feathers-solr
Feathersjs Solr Client
Stars: ✭ 29 (+31.82%)
Mutual labels:  solr
ClarityNLP
An NLP framework for clinical phenotyping. Docker | Python | Solr | OMOP. http://claritynlp.readthedocs.io/en/latest/
Stars: ✭ 100 (+354.55%)
Mutual labels:  solr
jease
Jease is a Java CMS framework based on Object Database
Stars: ✭ 25 (+13.64%)
Mutual labels:  solr
solwr
Apache Solr nodejs wrapper
Stars: ✭ 18 (-18.18%)
Mutual labels:  solr
j8spec
Library that allows tests written in Java to follow the BDD style introduced by RSpec and Jasmine.
Stars: ✭ 45 (+104.55%)
Mutual labels:  rspec
go-solr
Solr client in Go, core admin, add docs, update, delete, search and more
Stars: ✭ 67 (+204.55%)
Mutual labels:  solr
SolRDF
An RDF plugin for Solr
Stars: ✭ 115 (+422.73%)
Mutual labels:  solr
solr-cool.github.io
The Solr Package Directory and Sanctuary
Stars: ✭ 13 (-40.91%)
Mutual labels:  solr
SitecoreInstallExtensions
Sitecore Install Extensions
Stars: ✭ 29 (+31.82%)
Mutual labels:  solr
argo
The administrative discovery interface for Stanford's Digital Object Registry
Stars: ✭ 19 (-13.64%)
Mutual labels:  solr

solrwrapper

Wrap any task with a Solr instance:

SolrWrapper.wrap do |solr|
  # Something that requires Solr
end

Or with Solr and a solr collection:

SolrWrapper.wrap do |solr|
  solr.with_collection(dir: File.join(FIXTURES_DIR, "basic_configs")) do |collection_name|
  end
end

Basic Options

SolrWrapper.wrap port: 8983,
                 verbose: true,
                 managed: true,
                 instance_dir: '/opt/solr'

Valid ruby and YAML options

Option
instance_dir Directory to store the solr index files
url URL of the TGZ artifact to download
mirror_url Mirror to download the solr artifacts from (e.g. http://lib-solr-mirror.princeton.edu/dist/)
version Solr version to download and install
port port to run Solr on
version_file Local path to store the currently installed version
download_dir Local path for storing the downloaded Solr tgz file
artifact_path Local path to the Solr tgz file
checksum Path/URL to checksum
solr_xml Path to Solr configuration
verbose (Boolean)
managed (Boolean)
ignore_checksum (Boolean)
solr_options (Hash)
env (Hash)
persist (Boolean) Preserves the data in you collection between startups
contrib (Array)
solr.with_collection(name: 'collection_name', dir: 'path_to_solr_configs')

From the command line

$ solr_wrapper -p 8983

To see a list of valid options when using solr_wrapper to launch a Solr instance from the command line:

$ solr_wrapper -h

Configuration file

SolrWrapper can read configuration options from a YAML configuration file. By default, it looks for configuration files at .solr_wrapper and ~/.solr_wrapper.

You can also specify a configuration file when launching from the command line as follows:

$ solr_wrapper --config <path_to_config_file>

Cleaning your repository from the command line

By defualt SorlWrapper will clean out your data when it shuts down. If you utilize the preserve option your data will remain between runs.

To clean out data that is being preserved explicitly run:

$ solr_wrapper <configuration options> clean

Note You must use the same configuration options on the clean command as you do on the run command to clean the correct instance.

Rake tasks

SolrWrapper provides rake tasks for installing, starting and stopping solr. To include the tasks in your Rake environment, add this to your Rakefile

  require 'solr_wrapper/rake_task'

You can configure the tasks by setting SolrWrapper.default_instance_options. For example:

SolrWrapper.default_instance_options = {
    verbose: true,
    cloud: true,
    port: '8888',
    version: '5.3.1',
    instance_dir: 'solr',
    download_dir: 'tmp'
}
require 'solr_wrapper/rake_task'
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].