searchkick  by ankane

Ruby gem for integrating intelligent search

Created 12 years ago
6,671 stars

Top 7.7% 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 week ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
9
Star History
16 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Simon Willison Simon Willison(Coauthor of Django).

semantra by freedmand

0.1%
3k
CLI tool for semantic document search
Created 2 years ago
Updated 1 year ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Zack Li Zack Li(Cofounder of Nexa AI), and
12 more.

search_with_lepton by leptonai

0.0%
8k
Conversational search engine demo
Created 1 year ago
Updated 1 month ago
Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Simon Horup Eskildsen Simon Horup Eskildsen(Cofounder of Turbopuffer), and
21 more.

meilisearch by meilisearch

0.2%
54k
Search engine API for integrating AI-powered hybrid search
Created 7 years ago
Updated 9 hours ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Assaf Elovic Assaf Elovic(Cofounder of Tavily), and
9 more.

Perplexica by ItzCrazyKns

0.3%
27k
AI-powered search engine alternative
Created 1 year ago
Updated 5 days ago
Feedback? Help us improve.