All Projects → pat → Thinking Sphinx

pat / Thinking Sphinx

Licence: mit
Sphinx plugin for ActiveRecord/Rails

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Thinking Sphinx

Javersphinxbundle
Symfony bundle which provides integration of Sphinx search engine with Symfony using SphinxQL
Stars: ✭ 18 (-98.88%)
Mutual labels:  search, sphinx
Algoliasearch Rails
AlgoliaSearch integration to your favorite ORM
Stars: ✭ 352 (-78.12%)
Mutual labels:  search, rails
Riddle
Ruby Client API for Sphinx
Stars: ✭ 139 (-91.36%)
Mutual labels:  search, sphinx
Libraries.io
📚 The Open Source Discovery Service
Stars: ✭ 903 (-43.88%)
Mutual labels:  search, rails
Similar Text Finder
🐝 PHP Similar Text Finder aka Fuzzy search. `Did you mean "banana"?`
Stars: ✭ 126 (-92.17%)
Mutual labels:  search
Zero Rails openapi
Concise DSL for generating OpenAPI Specification 3 (OAS3) JSON documentation for Ruby application.
Stars: ✭ 125 (-92.23%)
Mutual labels:  rails
Spree auth devise
Provides authentication (user accounts, login & signup) for @spree by using Devise
Stars: ✭ 124 (-92.29%)
Mutual labels:  rails
Lucenenet
Apache Lucene.NET
Stars: ✭ 1,704 (+5.9%)
Mutual labels:  search
Holmes
Fast and easy searching inside a page
Stars: ✭ 1,679 (+4.35%)
Mutual labels:  search
Twemoji
Twitter emoji in Ruby 😊
Stars: ✭ 127 (-92.11%)
Mutual labels:  rails
Creact
crud in Rails and React | Tutorial
Stars: ✭ 126 (-92.17%)
Mutual labels:  rails
Trestle
A modern, responsive admin framework for Ruby on Rails
Stars: ✭ 1,676 (+4.16%)
Mutual labels:  rails
Awesome Ruby Blogs
A curated list of Awesome Ruby Blogs and Newsletters for Ruby Developers and Newbies
Stars: ✭ 127 (-92.11%)
Mutual labels:  rails
Boring generators
Boring generators aims to make your development faster by delegating boring setups to us.
Stars: ✭ 125 (-92.23%)
Mutual labels:  rails
Newznab Tmux
Laravel based usenet indexer
Stars: ✭ 127 (-92.11%)
Mutual labels:  sphinx
Ffind
A sane replacement for find
Stars: ✭ 124 (-92.29%)
Mutual labels:  search
Activerecord where assoc
Make ActiveRecord do conditions on your associations
Stars: ✭ 126 (-92.17%)
Mutual labels:  rails
So Simple Theme
A simple Jekyll theme for words and pictures.
Stars: ✭ 1,701 (+5.72%)
Mutual labels:  search
Cyb
Immortal robot for the Great Web
Stars: ✭ 126 (-92.17%)
Mutual labels:  search
Nnn
n³ The unorthodox terminal file manager
Stars: ✭ 13,138 (+716.53%)
Mutual labels:  search

Thinking Sphinx

Thinking Sphinx is a library for connecting ActiveRecord to the Sphinx full-text search tool, and integrates closely with Rails (but also works with other Ruby web frameworks). The current release is v5.3.0.

Upgrading

Please refer to the changelog and release notes for any changes you need to make when upgrading. The release notes in particular are quite good at covering breaking changes and more details for new features.

The documentation also has more details on what’s involved for upgrading from v4 to v5, v3 to v4, and v1/v2 to v3.

Installation

It’s a gem, so install it like you would any other gem. You will also need to specify the mysql2 gem if you’re using MRI, or jdbc-mysql if you’re using JRuby:

gem 'mysql2',          '~> 0.4',    :platform => :ruby
gem 'jdbc-mysql',      '~> 5.1.35', :platform => :jruby
gem 'thinking-sphinx', '~> 5.3'

The MySQL gems mentioned are required for connecting to Sphinx, so please include it even when you’re using PostgreSQL for your database.

You’ll also need to install Sphinx – this is covered in the extended documentation.

Usage

Begin by reading the quick-start guide, and beyond that, the documentation should serve you pretty well.

Requirements

The current release of Thinking Sphinx works with the following versions of its dependencies:

Library Minimum Tested Against
Ruby v2.4 v2.4, v2.5, v2.6, v2.7, v3.0
Sphinx v2.2.11 v2.2.11, v3.3.1
Manticore v2.8 v3.5, v4.0
ActiveRecord v4.2 v4.2..v7.0

It might work with older versions of Ruby, but it’s highly recommended to update to a supported release.

It should also work with JRuby, but the test environment for that in CI has been unreliable, hence that’s not actively tested against at the moment.

Sphinx or Manticore

If you’re using Sphinx, v2.2.11 is recommended even though it’s quite old, as it works well with PostgreSQL databases (but if you’re using MySQL – or real-time indices – then v3.3.1 should also be fine).

If you’re opting for Manticore instead, v2.8 or newer works, but v3 or newer is recommended as that’s what is actively tested against.

Rails and ActiveRecord

Currently Thinking Sphinx is built to support Rails/ActiveRecord 4.2 or newer. If you’re using Sinatra and ActiveRecord instead of Rails, that’s fine – just make sure you add the :require => 'thinking_sphinx/sinatra' option when listing thinking-sphinx in your Gemfile.

If you want ActiveRecord 3.2-4.1 support, then refer to the 4.x releases of Thinking Sphinx. Or, for ActiveRecord 3.1 support, then refer to the 3.0.x releases. Anything older than that, then you’re stuck with Thinking Sphinx v2.x (for Rails/ActiveRecord 3.0) or v1.x (Rails 2.3). Please note that these older versions are no longer actively supported.

Ruby

You’ll need either the standard Ruby (v2.4 or newer) or JRuby (9.1 or newer).

Database Versions

MySQL 5.x and Postgres 8.4 or better are supported.

Contributing

Please note that this project has a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

To contribute, clone this repository and have a good look through the specs – you’ll notice the distinction between acceptance tests that actually use Sphinx and go through the full stack, and unit tests (everything else) which use liberal test doubles to ensure they’re only testing the behaviour of the class in question. I’ve found this leads to far better code design.

All development is done on the develop branch; please base any pull requests off of that branch. Please write the tests and then the code to get them passing, and send through a pull request.

In order to run the tests, you’ll need to create a database named thinking_sphinx:

# Either fire up a MySQL console:
mysql -u root
# OR a PostgreSQL console:
psql
# In that console, create the database:
CREATE DATABASE thinking_sphinx;

You can then run the unit tests with rake spec:unit, the acceptance tests with rake spec:acceptance, or all of the tests with just rake. To run these with PostgreSQL, you’ll need to set the DATABASE environment variable accordingly:

DATABASE=postgresql rake

Licence

Copyright © 2007-2021, Thinking Sphinx is developed and maintained by Pat Allan, and is released under the open MIT Licence. Many thanks to all who have contributed patches.

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].