Hi All,
I was wondering if anyone had experience of extending AAF plugin for
Rails to implement a broader query ?
The documentation and the demo provided on the
http://projects.jkraemer.net/acts_as_ferret/ wiki seems to only match
full text queries, or partial when using a * wildcard.
Ideally, I am trying to acheive something similar to the following
(pseudo code):
def search
@query = params[:query] || ‘’
unless @query.blank?
@results = Content.find_by_contents @query
if @results.empty?
@results = Content.partial_word_search @query
if @results.empty?
@results = Content.fuzzy_word_search @query
end
end
end
end
I realise I could probably achieve something like this by changing
http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails to
meet my needs, but I quite like the indexing elegance provided with AAF,
and don’t want to have to reinvent the wheel.
If anyone has experience or pointers that would be great!
Apologies for posting on the ferret list for a rails-ish problem, but
searching the archives seemed to show most of the questions end up here!
Thank,
Paul