searchkick  by ankane

Ruby gem for integrating intelligent search

created 12 years ago
6,644 stars

Top 7.8% on sourcepulse

GitHubView on GitHub
Project Summary

Searchkick is a Ruby gem that provides intelligent search capabilities for Rails applications, leveraging Elasticsearch or OpenSearch. It aims to simplify the integration of powerful search features like stemming, synonym handling, typo tolerance, and personalized results, making search smarter and more user-friendly.

How It Works

Searchkick acts as a wrapper around Elasticsearch/OpenSearch, providing a Ruby-friendly DSL for indexing and querying. It automatically handles data synchronization between your database and the search index. Key features include intelligent stemming, custom synonyms, misspelling correction, and boosting mechanisms to prioritize relevant results. It also supports advanced functionalities like aggregations, geospatial search, and semantic search via nearest neighbor capabilities.

Quick Start & Requirements

  • Install: Add gem "searchkick" and either gem "elasticsearch" or gem "opensearch-ruby" to your Gemfile.
  • Prerequisites: Requires Elasticsearch (v7, v8) or OpenSearch (v1, v2). Install and run a search server (e.g., via Homebrew: brew install elasticsearch-full or opensearch).
  • Setup: Add searchkick to your models, run Product.reindex, and then query using Product.search("query").
  • Docs: https://github.com/ankane/searchkick

Highlighted Details

  • Intelligent Search: Learns from user searches and conversions to improve results over time.
  • SQL-like Querying: Allows familiar syntax for filtering, sorting, and limiting results.
  • Advanced Features: Supports aggregations, geospatial search, autocomplete, "did you mean" suggestions, and semantic search.
  • Zero Downtime Reindexing: Facilitates seamless updates to the search index.

Maintenance & Community

  • Maintained by Andrew Kane, with contributions from a community of developers.
  • Active development and regular updates.

Licensing & Compatibility

  • MIT License. Permissive for commercial use and integration with closed-source applications.

Limitations & Caveats

  • Requires a separate Elasticsearch or OpenSearch instance, adding operational overhead.
  • Deep paging beyond 10,000 results requires enabling deep_paging: true, which can impact performance.
  • Elasticsearch/OpenSearch eventual consistency means changes may take up to a second to reflect in search results unless refresh is explicitly called.
Health Check
Last commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
0
Star History
45 stars in the last 90 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Mike McNeil Mike McNeil(Author of Sails.js; Cofounder of Fleet), and
10 more.

meilisearch by meilisearch

0.2%
53k
Search engine API for integrating AI-powered hybrid search
created 7 years ago
updated 1 day ago
Feedback? Help us improve.