Displaying 20 results from an estimated 10000 matches similar to: "Acts_as_ferret - phrase query"
2006 Aug 08
1
acts_as_ferret to search partial phrases and fuzzy
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
2006 Jul 10
2
acts_as_ferret 0.2.2
Hi all,
I just tagged acts_as_ferret 0.2.2 as the current stable version, so get
it while it''s hot ;-)
new features:
- added support for the multiple models/single index approach.
- find out the total number of search results by calling total_hits on
the array returned by find_by_contents.
fixes:
- trac tickets #20 (find_by_contents breaks ferret sorting) and #24
2006 Nov 06
21
acts_as_ferret and associations
I have the following models:
class Book < ActiveRecord::Base
acts_as_ferret
belongs_to :author
end
class Author < ActiveRecord::Base
has_many :books
end
and in the controller:
def search
if params[:query]
@query = params[:query]
@total, @books = Book.full_text_search(@query, :page =>
(params[:page]||1))
@pages =
2007 Jul 19
1
Acts_As_Ferret only returns results when searching for "*"
Hey, I''m probably just missing something really obvious but I''ve been
stuck on this problem for a while now and I''m not getting anywhere.
I have installed the acts_as_ferret gem, as well as ferret according to
the tutorial on RailsEnvy. My model, controller, and environment.rb
files have all been modified as per that turotial. However any attempts
to use the
2006 Nov 27
2
find_conditions in acts_as_ferret find_by_contents
Hi all,
Every time I try to add options for the find_conditions argument of
find_by_contents I get the following:
a = AnnotatedLink.find_by_contents(''test'', {}, {:conditions =>
''category_id IS NOT NULL''})
>> NoMethodError: You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while
2006 Jul 09
3
acts_as_ferret.. what does it actually do?
Okay in this plea for help I''m going to repeat some of what i posted
before but with a larger amount of background info in the hope that i
can get a decent grip on ferret before it wriggles away..
Firstly, what does installing the acts_as_ferret plugin actually do? I
install it and add it to my model and then the index is automatically
generated and a few methods are added to it and
2007 May 25
1
how to update index with acts_as_ferret?
Hey all,
I have movie has_many :medias and media belongs_to :media
this is how my movie class looks like:
class Movie < ActiveRecord::Base
has_many :medias
acts_as_ferret :fields => [:title,:medias_name]
def medias_name
return self.medias.inject("") {|name,m| name + " " + m.name}
end
end
when I do Movie.find_by_contents("title:bob") it does return a movie
2007 Oct 03
3
Pagination problem with acts_as_ferret
Hi,
am using this wonderful plugin acts_as_ferret and according to the
tutorial at http://railsenvy.com/2007/2/19/acts-as- ? rial#basic
I worked it out except the pagination feature.
If I have 12 records and I give limit to 10, its correctly displaying 10
records in the first page and is giving the link to the second page too.
But when I go to the next page I find the same 10 records instead of
2007 Nov 13
8
acts_as_ferret : cannot use a customized Analyzer (as indicated in the AdvancedUsageNotes)
Hi all,
I cannot make aaf (rev. 220) use my custom analyzer, despite following the
indications @
http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage
To pinpoint the problem, I created a model + a simple analyzer with 2 stop
words : "fax" and "gsm".
test 1 : model.rebuild_index + model.find_by_contents("fax") # fax is a
stop word.
=> I get a
2007 Mar 03
6
Problem with ferret :(
hi, i''m trying ferret and acts_as_ferret, it''s good, but i''ve a little
problem. i''ve a model book which has a title and a quantity, how can i
search using act_as_ferret all books which quantity is > 0 ? and howand
with a search like "book", how can i found also title like "books" ? and
the last, if i search "bok", is it possible
2005 Dec 02
43
ANN: acts_as_ferret
Hi all
This week I have worked with Rails and Ferret to test Ferrets (and Lucenes)
capabilities. I decided to make a mixin for ActiveRecord as it seemed the
simplest possible solution and I ended up making this into a plugin.
For more info on Ferret see:
http://ferret.davebalmain.com/trac/
The plugin is functional but could easily be refined. Anyway I want to share it
with you. Regard it as a
2005 Dec 02
43
ANN: acts_as_ferret
Hi all
This week I have worked with Rails and Ferret to test Ferrets (and Lucenes)
capabilities. I decided to make a mixin for ActiveRecord as it seemed the
simplest possible solution and I ended up making this into a plugin.
For more info on Ferret see:
http://ferret.davebalmain.com/trac/
The plugin is functional but could easily be refined. Anyway I want to share it
with you. Regard it as a
2006 Nov 21
5
acts_as_ferret with STI models
Can acts_as_ferret search only one of the inherit models in the
hierarchy of STI models? Say you have Contents, with types articles and
comments. I know that you do Contents.find_by_contents, but can you
also create indexed for Comment and Articles?
Thanks for you help
Miguel
--
Posted via http://www.ruby-forum.com/.
2007 May 30
4
aaf and dynamic attrs: a bug?
Hi!
I faced some issue while using it for dynamic attrs indexing/search.
Maybe I made something wrong. Here is test method. Everything works just
fine until last line http://pastie.caboo.se/66274 . Tested on both
stable and trunk of aaf and ferret 0.11.4.
the short version of code below:
Contact.acts_as_ferret :fields => [ :first_name ]
assert
2006 Sep 01
3
Ferret/acts_as_ferret don''t seem to be doing anything
I''m having an odd problem with Ferret 0.9.5 and acts_as_ferret 0.2.3, on
RedHat Linux Enterprise 4.
All of my find_by_contents calls return 0 results. When I try
Foo.rebuild_index via the console, it returns nil.
This is happening on my production machine, during deployment of my app.
Everything works perfectly on my development machine (Windows).
I have no idea where to start
2006 Jun 25
1
Sorting ferret results by column
I have the acts_as_ferret plugin installed. Everything searches great,
but I would like to limit the results (i.e. by ''end_date'') and sort them
(by ''end_date''). ''end_date'' is a valid column in my "posts" table.
Here''s the code I have already:
@posts = Post.find_by_contents(params[:query])
params[:query] comes from a form. I
2006 Aug 25
7
acts_as_ferret with conditions
Hello guys,
Having a slight problem with acts_as_ferret, specifically using a
condition. I have the following code
@results = SupplierProduct.find_by_contents(params
[:search], :conditions => [''area_id = ?'', @area])
and it seems the condition isn''t being applied. Does anyone have any
pointers?
Cheers,
Alastair
------
Alastair Moore
Standards compliant web
2007 Jun 27
2
acts_as_ferret, DRb, and filter_proc
I was just trying to use acts_as_ferret with DRb and filter_proc,
without much success. My guess is that this isn''t possible because
there''s no way to send the proc to the DRb server, correct?
Person.find_by_contents("jonathan", :filter_proc => proc {}) causes an
exception when using DRb (DRb::DRbConnError: DRb::DRbServerNotFound).
I can work around this by
2006 Jul 06
5
acts_as_ferret Locale issue
I''ve just installed acts_as_ferret, and am trying to build my index, but
I''m getting the following error:
>> r = Topic.find_by_contents(''testing'')
StandardError: : Error occured at <analysis.c>:704
Error: exception 2 not handled: Error decoding input string. Check that
you have the locale set correctly
from
2007 Apr 30
1
Can''t search fields with space
Hi,
I have a user model that has a city field which is searchable using
acts_as_ferret.
But I can''t get it to return any result whether I use
:city => {:store => :no, :index => :untokenized},
or
:city => {:store => :no} in my User model''s acts_as_ferret option
>>> User.find_by_contents("city:(cal poly)")
=>