Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 1, 2011
  1. Release 0.0.9

    authored
  2. [DOC] Updated the website text; remove stuff about experimental activ…

    authored
    …emodel, point to Readme until there's better documentation
  3. [DOC] README tweaks

    authored
  4. [GEM] Updated the gemspec file

    authored
  5. [DOC] Added information & instructions about ActiveRecord/ActiveModel…

    authored
    … integration into the README; trimmed TODOs
  6. [DOC] Heavy update of the README file: added docs about new features,…

    authored
    … added ActiveModel integration docs, removed cruft
Commits on Apr 30, 2011
  1. [ACTIVEMODEL] Added template to create a basic Rails application with…

    authored
    … full-text search via Slingshot configured & running
  2. [ACTIVEMODEL] [FIX] Fixed an error where ActiveRecord instances were …

    authored
    …not marked as `persisted?` (hence routes didn't work)
Commits on Apr 29, 2011
  1. [TEST] Fixed random test fails where hash or model JSON encodings hav…

    authored
    …e different string representation (different key order)
  2. [TEST] Fixed an error where test for Hash#to_indexed_json was falsely…

    authored
    … failing on key order mismatch
  3. [IMPORT] Refactored the import Rake task to use the new Index#import …

    authored
    …implementation (allow set different index name)
  4. [ACTIVEMODEL] [IMPORT] Refactored `Slingshot::Model::Import.import` i…

    authored
    …mplementation to use the new `Index#import` method
  5. [IMPORT] Added `Index#import` method for convenient bulk importing do…

    authored
    …cuments into the index
    
    Refactored from Model::Import.
  6. [IMPORT] Changed the implementation of import Rake task to use the ne…

    authored
    …w block handling in `import`
  7. [IMPORT] Change the block handling in `import` method: it yields docu…

    authored
    …ments, allowing to manipulate them before indexing
  8. [DOC] Updated README

    authored
  9. [ACTIVEMODEL] Fixed error where persistent model was not found with a…

    authored
    … list of IDs in ES 0.16, implemented via `ids` query
    
    See: elastic/elasticsearch#865
  10. Added the "dual interface" for the `Slingshot` method, allowing it to…

    authored
    … pass as Ruby Hash or JSON string
  11. [IMPORT] Added Rake task for convenient importing of data from models…

    authored
    …. Progress bar included.
    
    Usage:
    
        rake environment slingshot:import CLASS='Article'
    
    This will call:
    
        Article.paginate :page => 1
    
    It is possible to pass arguments to the paginate method:
    
        rake environment slingshot:import CLASS='Article' PARAMS='{:per_page => 1000}'
    
    It is also possible to force import, by deleting the index first:
    
        rake environment slingshot:import CLASS='Article' FORCE=1
  12. [IMPORT] Allow the `Model.import` to optionally take a block, which i…

    authored
    …s yielded on every loop iteration
    
    The main use case is progress bar, of course. I CAN HAS PROGREZ BARZ LIKE HOMEBRU!
  13. [ACTIVEMODEL] Added support for effective importing data from ActiveM…

    authored
    …odel class into the index, via bulk API
    
    Example:
    
        class Book < ActiveRecord::Base
          include Slingshot::Model::Search
          include Slingshot::Model::Callbacks
        end
    
        Book.import
    
    Yes, that's all :)
    
    Your model must provide a `paginate` method (eg. via will_paginate), since we don't want to fry memory with large data.
    
    Any parameters you pass to the `import` method are passed to the `paginate` method.
    
    This is especially handy when you want to limit the documents, eg.:
    
        Post.paginate(:conditions => {:title => "Search"}, :page => 1, :per_page => 20)
    
    Also, it's very convenient for the excentrical approach of CouchRest Model:
    
        Post.import(:design_doc => "Post", :view_name => "all", :page => 1, :per_page => 1000, :include_docs => true)
Something went wrong with that request. Please try again.