Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Sep 21, 2012
  1. @aledalgrande

    [#461] Fixed the incorrect instructions for Mongo integration

    aledalgrande authored committed
    Fixes #438, closes #461
Commits on Mar 26, 2012
  1. [#289] Update README and documentation, use the `prefix` query as the…

    authored
    … example of "unsupported" query
  2. @plentz

    [#289] Added the "fuzzy" query type

    plentz authored committed
    See <http://www.elasticsearch.org/guide/reference/query-dsl/fuzzy-query.html>
    
    This is a combination of 4 commits:
    
    * initial implementation of fuzzy api
    * just a bit improvement to the docs to make fuzzy example easier to read
    * unit tests for fuzzy query
    * integration test for fuzzy query
Commits on Mar 16, 2012
  1. [DOC] Update documentation for Mongoid users in Readme

    authored
    * Leave out needless code
    * Use `as_json`, not `to_json` in the `Article.to_indexed_json`!
    * Use the proxy to not mix it up with Mongoid interface: `Article.tire.search 'love'`
    
    Fixes #157.
Commits on Feb 4, 2012
  1. @namxam

    [DOC] Fixed global facet example in documentation

    namxam authored committed
    Closes #227.
Commits on Jan 7, 2012
Commits on Nov 29, 2011
  1. [DOC] README updates

    authored
  2. [ACTIVEMODEL] Added the support for casting model properties as Ruby …

    authored
    …objects
    
    In Tire::Persistence, you define a model property to be casted
    as a custom Ruby class instance.
    
    Currently, the implementation expects your class to take a Hash of attributes
    on initialization. (There are plans to support custom initialization logic.)
    
    You can cast either single values (see `Author` in the example below),
    or collections of values (see `[Comment]`). The behaviour was inspired
    by the CouchRest-Model gem.
    
    Also, all strings which conform to the UTC time format are automatically
    converted to Time objects.
    
    Also, all Hashes are automatically converted to Hashr [https://rubygems.org/gems/hashr]
    instances, allowing easy "dot-style" access to nested hash properties.
    
    Example:
    
        class Article
          include Tire::Model::Persistence
    
          validates_presence_of :title, :author
    
          property :title,        :analyzer => 'snowball'
          property :published_on, :type => 'date'
          property :tags,         :default => [], :analyzer => 'keyword'
          property :author,       :class => Author
          property :comments,     :class => [Comment]
        end
    
    See the test suite for more information.
  3. [ACTIVEMODEL] Added support for property defaults in Tire::Model::Per…

    authored
    …sistence
    
    In the new implementation of the `property` method, you can define default values for your model attributes:
    
        class Article
          include Tire::Model::Persistence
    
          property :title
          property :tags, :default => []
        end
    
        Article.create title: 'Test'
    
        Article.all.first.title
        # => 'Test'
    
        Article.all.first.tags
        # => []
Commits on Nov 25, 2011
  1. [FIX] Added proper Github URL to Rails application template to README

    Jakub Dušek authored committed
    For some users, the `rails new` command cannot accept redirects. Closes #154.
Commits on Sep 30, 2011
  1. [DOC] Added info about customized indexing logic

    authored
    (See #114 and #115 for context)
Commits on Sep 16, 2011
Commits on Sep 11, 2011
  1. [DOC] Added info about how to get rid of DSL for using Tire, if that'…

    authored
    …s your thing
    
    Thanks @chrisberkhout for the hint in #92!
Commits on Sep 8, 2011
  1. [ACTIVEMODEL] Refactored the support for setting index names prefixes…

    authored
    … for models
    
    Allows to call `index_prefix` either on the Tire::Model::Search module directly,
    to set the prefix for all models:
    
        Tire::Model::Search.index_prefix 'prefix_for_all'
    
    or for specific models:
    
        class Article
          # ...
          index_prefix 'my_prefix'
        end
    
    The usual use case is setting the index prefix depending on Rails environment.
    In that case, just put something like this in your initializer:
    
        Tire::Model::Search.index_prefix Rails.env
    
    Closes #99, closes #97.
  2. @redbeard

    Added the `Model::Search#index_prefix` setting for automatic adding o…

    redbeard authored committed
    …f prefixes for model indices
Commits on Sep 1, 2011
  1. [ACTIVEMODEL] Implemented all Tire features for models via a `MyModel…

    authored
    ….tire` and `MyModel#tire` proxies for better isolation
    
    Brings the Tire methods into the model class only when not trampling on someone other's foot (`settings`, `update_index`, etc.)
    
    These three calls are thus equivalent:
    
        class Article
          # ...
          mapping do
            indexes :id, :type => 'string', :index => :not_analyzed
          end
        end
    
        class Article
          # ...
          tire.mapping do
            indexes :id, :type => 'string', :index => :not_analyzed
          end
        end
    
        class Article
          # ...
          tire do
            mapping do
              indexes :id, :type => 'string', :index => :not_analyzed
            end
          end
        end
    
    Closes #8, closes #9.
Commits on Aug 30, 2011
  1. @pacoguzman

    [FACETS] Added support for histogram facets

    pacoguzman authored committed
    Closes #82.
Commits on Aug 29, 2011
Commits on Aug 28, 2011
  1. @pacoguzman

    Updated documentation and Rails template to use ElasticSearch version…

    pacoguzman authored committed
    … 0.17.6
    
    Closes #81.
Commits on Aug 26, 2011
  1. [ACTIVEMODEL] Added `MyModel.settings` method to allow creating the i…

    authored
    …ndex with custom settings and mappings
    
    Usage:
    
        class MyModel
          include Whatever::ORM
    
          include Tire::Model::Search
          include Tire::Model::Callbacks
    
          settings :number_of_shards => 1,
                   :number_of_replicas => 1,
                   :analysis => {
                     :filter => {
                       :url_ngram  => {
                         "type"     => "nGram",
                         "max_gram" => 5,
                         "min_gram" => 3},
                     },
                     :analyzer => {
                       "url_analyzer" => {
                        "tokenizer"    => "lowercase",
                        "filter"       => ["stop", "url_ngram"],
                        "type"         => "custom"
                       }
                     }
                    } do
            mapping do
              indexes :url, :type => 'string', :analyzer => "url_analyzer"
            end
          end
    
        end
    
    Note, that the index is only created when you declare mappings with the `mapping` method. If this is not what you want,
    just create the index with the `Tire.index('whatever').create ...` method!
Commits on Aug 21, 2011
  1. [DOC] Updated the Readme

    authored
Commits on Aug 18, 2011
Commits on Aug 15, 2011
  1. @sbeckeriv

    [DOC] Added more consistent example of bulk importing documents into …

    sbeckeriv authored committed
    …index with mapping to the README [Closes #71]
Commits on Aug 5, 2011
  1. [DOC] Readme updates

    authored
Commits on Aug 4, 2011
  1. [DOC] Added information about passing options such as `use_dis_max` t…

    authored
    …o queries.
    
    Thanks @olivere for the hint.
Something went wrong with that request. Please try again.