Permalink
Commits on Jun 21, 2013
Commits on Jun 18, 2013
  1. [DOC] Added info about performing the index operation in background (…

    …Resque, Sidekiq, etc)
    karmi committed Jun 18, 2013
Commits on Jun 8, 2013
  1. Release v0.6.0

    karmi committed Jun 8, 2013
  2. [DOC] Fixed a typo in the README

    karmi committed Jun 8, 2013
Commits on Jun 7, 2013
  1. Allow several filters in a ConstantScoreQuery

    Filters are automatically wrapped by `:and`
    
    Closes #715
    jockee committed with karmi Apr 26, 2013
  2. Added Item#read_attribute_for_serialization for ActiveModel::Serializ…

    …ers compatibility
    
    
    Closes #700
    lister committed with karmi Apr 11, 2013
Commits on Jun 6, 2013
  1. Added support for `_version_type` in Tire::Index#bulk

    Closes #633
    Midpoint Data Layer committed with karmi Feb 15, 2013
  2. Improved the `ids` query

    * Type is an optional argument
    * IDs argument is converted to Array
    
    Closes #751
    karmi committed Jun 6, 2013
Commits on Jun 5, 2013
  1. [FIX] Rescue HTTP client specific connection errors in MyModel#create…

    …_elasticsearch_index
    
    Added a `__host_unreachable_exceptions` for each HTTP client (adapter), so we can
    rescue connection related errors in `create_elasticsearch_index`.
    
    Closes #729
    karmi committed Jun 5, 2013
  2. [FIX] Merge returned `fields` with `_source` if both are returned

    Previously, when asking for `_source` in `fields`, only the specific `fields`
    have been returned, not the full _source.
    
    The Elasticsearch behaviour has possibly changed here,
    see <karmi#31 (comment)>
    
    Closes #663, closes #687, closes #712
    jwaldrip committed with karmi Mar 5, 2013
  3. Removed the auto-loading of Rails' `environment` task

    As reported by some users, the auto-loading didn't invoked/executed the task properly,
    resulting in errors eg. due to not loaded initializers.
    
    The auto-invoking has been removed, since the documentation clearly states
    to invoke the task before the importing one.
    
    Closes #708
    karmi committed Jun 5, 2013
  4. [#724] Use modulo in Mongoid import strategy for breaking up collection

    In Mongoid import strategy, use the modulo division for better semantics
    of breaking up the collection into batches.
    
    Fixes: #724
    karmi committed Jun 5, 2013
  5. [#724] Fix incorrect Mongoid import strategy

    * For collections less then :per_page, no data would be imported.
    * For a collection of 1,200 items, the last 200 documents won't be imported for the default batch of 1,000
    
    Fixes #724
    
    Cc: @tobycox
    karmi committed Jun 5, 2013
  6. Changed, that Mongoid cursor is used for import, avoiding `skip()`

    Iterating through mongoid collections using skip() can get really slow for large collections, as it has to traverse from the beginning of the collection (http://docs.mongodb.org/manual/reference/method/cursor.skip/).
    
    We were seeing our import task freeze up with high I/O after importing around 2.5 million records in a 6 million record collection.
    
    This commit alters the Mongoid import task so that it batches manually and makes the use of Mongoid's cursor to only return a small batch of results.
    
    Closes #724
    tobycox committed with karmi Apr 30, 2013
  7. Added conversion of params object to Hash in <Tire.search>

    Previously, `to_hash` method was checked, but not called on the params object
    karmi committed Jun 5, 2013
  8. Allow the `:wrapper` option to be passed to Tire.search consistently

    Example:
    
        s = Tire.search 'articles-test', wrapper: ::MyCustomWrapper do
          query { match :title, 'one' }
        end
    
        s = Tire.search(
          'articles-test',
          payload: { query: { match: { title: 'one' } } },
          wrapper: ::MyCustomWrapper
        )
    
    Closes #716
    mattiassvedhem committed with karmi Apr 26, 2013
  9. [FIX] Make Tire::Results::Collection#to_ary return an Array

    Closes #718, closes #432
    Brandon Istenes committed with karmi May 1, 2013
  10. Added a custom strategy option to <Model.import>

    Sometimes, when you have a complicated ActiveRecord relationships,
    you need tight control on the importing SQL queries and mechanics.
    
    This patch allows you to implement your own custom strategy, by
    implementing an `import` method, and passing it to <Model.import>
    as the `:strategy` option.
    
    Example:
    
    class MyCustomImportStrategy
      include Base
      def import &block
        klass.
          where(published: true).
          joins(:comments).
          find_in_batches(:batch_size => options[:per_page]) do |batch|
            index.import batch, options, &block
          end
        self
      end
    end
    
    Closes #709
    leschenko committed with karmi Apr 18, 2013
  11. [#734] Added the `custom_filters_score` query from Tire contrib

    As a replacement for the `custom_filters_score` query added
    in previous commits, a more feature-complete implementation
    by @jerryluk from karmi/tire-contrib has been added.
    
    Fixes: #734
    karmi committed Jun 5, 2013
Commits on Jun 4, 2013
  1. [#734] Added DSL versions for `custom_filters_score` and restructured…

    … the source code
    
    Allow the DSL version of filters definition:
    
        s = Tire.search('articles-test') do
          query do
            custom_filters_score do
              query { all }
    
              # Give documents over 300 words a score of 3
              filter do
                filter :range, words: { gt: 300 }
                boost 3
              end
            end
          end
        end
    
    Related: #734
    karmi committed Jun 4, 2013
  2. Added support for the `custom_filters_score` query

    Closes #734
    fcheung committed with karmi May 20, 2013
  3. Added support for `geo_distance` facets

    Usage:
    
    Tire.search 'venues' do
      query { string 'pizzeria' }
    
      facet 'geo' do
        geo_distance :location,
                     {:lat => 53.54507, :lon => 9.95309},
                     [{:to => 1}, {:from => 1, :to => 10}, {:from => 50}],
                     unit: 'km'
      end
    end
    
    Closes #701
    Robin Brandt committed with karmi Apr 11, 2013
Commits on Jun 3, 2013
  1. [FIX] Fixed incorrect filename to class inflection in Rake import task

    `bundle exec rake environment tire:import:all` now succeeds for a `Address` model.
    
    Fix provided by @congshuanglong.
    
    Closes #733, closes #744
    karmi committed Jun 3, 2013
Commits on May 14, 2013
  1. Release v0.5.8

    Fixes: #688
    karmi committed May 14, 2013
Commits on May 12, 2013
  1. [TEST] Clean up percolator for <ActiveRecordSearchableIntegrationTest…

    …> and <PersistentModelIntegrationTest>
    
    * Delete the registered queries in setup
    * Wipe the whole _percolator index on Travis in setup
    
    Related: #537, #541
    karmi committed May 12, 2013