Lets say I want to create two separate indexes on something like BlogPosts, so that I can do a quick search using one index (for autocomplete purposes for example) then use the other index for full blown search querying.
Is that something I can do with Tire? so something like this (forgive me if its a little primitive)
class Post < ActiveRecord::Base
include Tire::Model::Search
include Tire::Model::Callbacks
index_name 'autocomplete'
mapping do
indexes :title, :analyzer => 'my_ngram_analyzer'
end
index_name 'main'
mapping do
indexes :title
indexes :description
indexes :author
indexes :published_on
end
end
where the callbacks know to add and remove new posts from the appropriate indexes