Flex
Flex is the ultimate ruby client for elasticsearch. It is powerful, fast and efficient, easy to use and customize.
It covers ALL the elasticsearch API, and transparently integrates it with your app and its components, like Rails
, ActiveRecord
, Mongoid
, ActiveModel
, will_paginate
, kaminari
, elasticsearch-mapper-attachments
, ...
It also implements and integrates very advanced features like chainable scopes, live-reindex, cross-model syncing, query fragment reuse, parent/child relationships, templating, self-documenting tools, detailed debugging, ...
Quick Start
The Flex documentation is very complete and detailed, so starting from the right topic for you will save you time. Please, pick the starting point that better describes you below:
For Tire Users
-
You may be interested to start from Why you should use Flex rather than Tire that is a direct comparison between the two projects.
-
Depending on your elasticsearch knowledge you can read below the "Elasticsearch Beginner" or the "Elasticsearch Expert" starting point sections.
For Flex 0.x Users
-
If you used an old flex version, please start with How to migrate from flex 0.x.
-
Depending on your elasticsearch knowledge you can read below the "Elasticsearch Beginner" or the "Elasticsearch Expert" sections.
For Elasticsearch Beginners
-
You may want to start with the Index and Search External Data tutorial, since it practically doesn't require any elasticsearch knowledge. It will show you how to build your own search application with just a few lines of code. You will crawl a site, extract its content and build a simple user interface to search it with elasticsearch.
-
Then you may want to read the Usage Overview page. Follow the links from there in order to dig into the topics that interest you.
-
You will probably like the flex-scopes that allows you to easy search, chain toghether and reuse searching scopes in pure ruby.
For Elasticsearch Experts
-
Flex provides the full elasticsearch APIs as ready to use methods. Just take a look at the API Metods page to appreciate its completeness.
-
Then you may want to read the Usage Overview page. Follow the links from there in order to dig into the topics that interest you.
-
If you are used to create complex searching logic, you will certainly appreciate the Templating System that gives you real power with great simplicity.
-
As an elasticsearch expert, you will certainly appreciate the Live-Reindex feature: it encapsulates the solution to a quite complex problem in just one method call.
Links
- Project Documentation
- Gem-Specific Documentation
- Issues
- Pull Requests
Branches
The master branch reflects the last published gems. Then you may find a next-version branch (named after the version string), with the commits that will be merged in master just before publishing the next gem versions. The next-version branch may get rebased or force pushed.
Credits
Special thanks for their sponsorship to Escalate Media and Barquin International.
Copyright
Copyright (c) 2012-2013 by Domizio Demichelis
See LICENSE for details.