Displaying 20 results from an estimated 10000 matches similar to: "How do you use acts_as_ferret without rails?"
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
2007 Jan 13
5
Problems using acts_as_ferret
Hi all,
I''m trying to use acts_as_ferret and have run into a brick wall.
My model is Page
My controller is Pages_controller.
When in console, I can search for contents, and find results. For
example, when I search for "spam" it "finds" 7 results.
=> #<FerretMixin::Acts::ARFerret::SearchResults:0x2693934
@total_hits=7, @results=[]>
you can do a
2006 Jun 25
1
acts_as_ferret with existing data (Building an index?)
Hi,
I''m trying to get the acts_as_ferret plugin to work with my rails
application, but it barfs with this error:
No such file or directory - ./index/development/Book/segments
I have existing data in my database, but it was added prior to me using
the ferret plugin. How do I get it to index that data, or when does it
index that data?
Charlie
--
Posted via
2006 Aug 14
1
respond_to? in acts_as_ferret results
acts_as_ferret''s search results use #method_missing to forward method
calls to the underlying result object. However, those methods are
represented in #respond_to?
Here''s a simple fix for that:
module FerretMixin
module Acts
module ARFerret
class SearchResults
def respond_to?(name)
self.methods.include?(name) || @results.respond_to?(name)
2006 Oct 09
1
acts_as_ferret: case insensitive search
How can I index and search RoR model objects in a case insensitive
manner? In Ferret there is the LowerCaseFilter
(http://ferret.davebalmain.com/api/classes/Ferret/Analysis/LowerCaseFilter.html).
How can I utilize it and other filters with acts_as_ferret?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 19
4
Ferret Indexing
Does ferret only index, when you create, or udpate a record?
Is there a way to make it index prexisting records?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Nov 16
1
Strange indexing issues with CachedModel, STI, and AAF
I started using robotcoop''s CachedModel class in my project but have encountered problems when using it with the acts_as_ferret plugin. It seems it doesn''t index everything in my STI model, also if I do a search from my base STI class I get a result count but no results. If I run the same search from one of the children STI models I get the appropriate results (if the information
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 Jun 29
13
find_by_contents not returning SearchResults?
The acts_as_ferret documentation says find_by_content returns an
instance of SearchResults, but I see this error when I try to use the
results.
undefined method `total_hits'' for []:Array
Here is the link to the documentation:
http://projects.jkraemer.net/acts_as_ferret/rdoc/classes/FerretMixin/Acts/ARFerret/ClassMethods.html#M000010
But here is the actual code:
result =
2006 May 22
7
how to index the result of any instance method
Hi,
One of the AAF features is to be able to index results of methods, but I
haven''t seen anywhere how to do this. I have a method that returns the
full text of a file and I''d like for this to be indexed. Can anyone out
there help me out on this one?
Tom
--
Posted via http://www.ruby-forum.com/.
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 =
2006 Oct 21
2
find_by_content result set
Hi Guys
I''m experiencing with AAF and Ferret with the intention of deploying
into the site that I am working on now.
So I setup AAF to index 3 fields that I have in this model and i tried
doing a find_by_contents and it returned the
#<FerretMixin::Acts::ARFerret::SearchResults:0xb74b5bec
@total_hits=1157, @results=[#<Payprofile:0xb74cc39c
@attributes={"add......
but it
2006 Oct 10
3
Dynamic fields and inheritance
I have a model that allows subclasses to dynamically define fields.
The following code is a short test case that illustrates the problem I''m
having:
class Product < ActiveRecord::Base
acts_as_ferret :fields => [:name]
serialize :data
def self.data_properties (*properties)
properties.each do |property|
define_method(property) {self.get_property(property)}
2006 Sep 25
9
acts_as_ferret highlight
I am getting nil returned when doing the following:
r.highlight(@condition, :field => ''body'')
''r'' is an instance of the a_a_f model. ''body'' is a tokenized saved
field.
I am running latest ferret and a_a_f trunk. Am I doing something wrong?
--
Posted via http://www.ruby-forum.com/.
2006 Oct 09
2
hello, acts_as_ferret questions, any help greatly appreciate
hi, ive been reading up on ferret, acts_as_ferret, and other search
plugins for rails.
after reading about ferret, i found out about the acts_as_ferrt plugin.
my first question about acts_as_ferret:
1. from reading about ferret, do i still need to manually save the IDX
and add a IDX column field to my model table for acts_as_ferret to work?
they say that acts_as_ferret handles everything,
2006 Aug 24
2
acts_as_ferret for Ferret 0.10
Hi all,
the current acts_as_ferret trunk is now ported to Ferret 0.10.
Get it while it''s hot at
svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin
Nearly everything works, besides this:
- all queries are ORed (no way to tell the QueryParser to build AND
queries by default)
- more_like_this is broken
I''m working with Dave to fix these things soon. The last Ferret 0.9.x
2007 Jul 17
3
two acts_as_ferret questions!
hi, guys:
two acts_as_ferret questions!
1, ruby script/plugin install
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret
sh: svn: command not found
i can not install acts_as_ferret to my Rails project.
what''s wrong? i''m useing rhel 4!
2, i downloaded the acts_as_ferret-0.4.0.tgz at
http://rubyforge.org/frs/?group_id=2916&release_id=10617
and uploaded to
2006 May 10
1
acts_as_ferret choking
Hi all,
I''ve ran into a problem with Ferret on my rails app, and I don''t
really have a clue about why. When running the unit tests, I get the
following error output:
> Exception raised:
> Class: <NoMethodError>
> Message: <"You have a nil object when you didn''t expect it!\nThe
> error occured while evaluating nil.version">
>
2006 Aug 24
5
[0.10.0 - acts_as_ferret] Problem while saving new items
Disclaimer: ferret newbie here, don''t blame too hard.
Hi, I''m trying to apply acts_as_ferret to apply search to my Person
model:
class Person < ActiveRecord::Base
validates_presence_of :name, :surname
acts_as_ferret :fields => [ ''name'', ''surname'' ]
...
But when I try to save a new Person instance I get this error: