similar to: Rails association and multiple indexes

Displaying 20 results from an estimated 5000 matches similar to: "Rails association and multiple indexes"

2007 Nov 09
2
Problem with stemming and AAF
I''m sure I''m missing something completely obvious here, so I hope someone can point me in the right direction! I''ve implemented a basic search with AAF, which works as expected; I''m running a ferret drb server, and using will_paginate to page results. The code in my search_controller.rb: search_text = params[:query] || " " @products =
2007 Apr 24
6
Questions about table association while using acts_as_ferret
Hi all, I''m quite new to ferret and acts_as_ferret and what to see if I can implement the following requirement using them. Suppose I have two model classes: Article and Comment. It''s obvious that one article may have many comments, so this is a one-many relationship. If I want to add full text search to these models, I''m supposed to use acts_as_ferret in both of the
2007 Oct 08
1
Can you alias fields in acts_as_ferret?
Is there any way to set a field name that is different than the method name used to populate it? My example: In Rails, I''m using acts_as_ferret on a Article model that has_many Authors. I want to be able to index authors'' names with each article. Since @article.authors yields an array of Author objects (and not an indexable string), I''ve created this method in my
2007 Aug 23
3
AAF: find_by_contents on AR Association Total Hits
I seem to be getting some behaviour thats unexpected (for me anyway) when using find_by_contents on an ActiveRecord has_many association. The results that are returned are only the records that belong to the model returned, but the total_hits that are being returned appear to be for the whole table. e.g. class Book < AR::Base has_many :pages end class Page < AR::Base belongs_to :book
2007 May 19
3
form question
Suppose I have the following models/migrations: class Car < ActiveRecord::Base belongs_to :manufacturer validates_presence_of :manufacturer validates_association :manufacturer end class CreateCars < ActiveRecord::Migration def self.up create_table cars do |t| t.column :name, :string t.column :manufacturer_id, :integer end end class Manufacturer <
2007 Sep 13
5
refreshing indexes?
I am new to ferret and am just reading about it in the O''reilly shortcuts as well as other web resources. My app is a Rails app and so I am looking into acts_as_ferret as well. There are some questions for which I couldn''t find answers in the material I have read so far so I''d appreciate any help on these from the list. A bit of a background. My app will have 10,000 -
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 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 Apr 13
10
Typo and acts_as_ferret rebuild_index errror
Hi, I''m running the edge Typo and the latest acts_as_ferret plugin and ferret gems (as of 11 April). In my Content model I put acts_as_ferret :fields => [:title, :body] In the console, I call Content.rebuild_index to index all of my existing content. All the directories get created etc, but I get the following error back: Loading development environment. >>
2007 Jul 11
1
plugin not loading for model? (acts_as_ferret)
Hi all, I''m using the older win32 happy backgroundrb in combination with the ''acts_as_ferret'' install as a plugin. Since I''ve installed acts_as_ferret, I haven''t been able to get backgroundrb to start. It keeps failing at the ''acts_as_ferret'' method call in one of my models. Here''s a code snippet of the model: class Book
2008 Jan 21
4
Rails app cannot connect to Ferret server
I have installet the Ferret gem v. 0.11.6 and the latest acts_as_ferret plugin from svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret I''ve followed the instructions here http://projects.jkraemer.net/acts_as_ferret/wiki/DrbServer to set up the server, and put acts_as_ferret :remote => true on one of my models (Ad) I can also start the ferret_server, but when
2007 Jul 23
1
AAF association not workin
Hi, I have configured my model as follows: class Product < ActiveRecord::Base acts_as_ferret :fields => [:description,:label_description,:label_free,:product_id_supplier,:description_supplier,:supplier_description] belongs_to :supplier def supplier_description return "#{self.supplier.description}" end In the development log I can see the supplier_description
2007 Jun 01
2
Is aaf multi_search broken?
Hi all, I want to use acts_as_ferret''s multi_search to search two model classes (Reviewable and Blog) at a time like @results = Reviewable.multi_search("jemen", [Blog]) and I''m always getting the error You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.map
2006 Dec 11
1
Index help on Polymorphic Associations
Hello, I''m a newbie to aaf and rails and I hope anyone can help me with this. I have the following Models: class Project < ActiveRecord::Base acts_as_authorizable acts_as_audited :except => [:created_by, :updated_by ], :user_class_name => ''AuthenticatedSystem'', :user_method => ''current_user'' acts_as_ferret :fields => {:name =>
2007 Apr 03
5
Inifinite loop problem with DRb server
Hi all, We''re attempting to use Ferret with the DRb server at the moment, and it doesn''t work, at all... = Executive Summary The DRb server process keeps on calling the remote index to the DRb server process... Which means DRb is calling itself, and itself, and itself, until Ruby kills the Thread with a SystemStackLevel error. = The excruciating details... # Mongrel is
2006 Jul 02
3
Multiple terms accross multipl fields and associated tables
I''m looking for a good way to search a few fields accross multiple asociated tables (i.e. find ''friends and family'' accross Photo.name, Photo.description, and Tags.name where Photo has_many tags). And, ideally there''s a competent query analyzer/parser. I''ve expirimented with constructing my own SQL using ... LIKE %term1% ... etc, but the
2006 Aug 10
1
Indexing weirdness
Hi, I''m having some problems with acts_as_ferret and indexing. I''ve got a simple 5 column table, and a corresponding Ruby model. I loaded 9 rows directly into the table using mysql (for live it''ll be about .5mil rows) and configured a Rails search page along the exact same lines as ferret_demo. Unfortunately, search wouldn''t return any results; following
2006 Aug 17
3
Ferret locks up when adding items to an index
I''m running Ferret 0.9.5 on a MacBook Pro (OS X 10.4.7) under Locomotive 2.0.7. I have a problem where Ferret is hanging when I try to add items to the index. It doesn''t happen with every object that''s being indexed, and I''m not sure what the objects in question have in common (they are not all instances of the same ActiveRecord object). The process
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"> >
2007 Jul 04
2
problems after gem update
Hi, I had ferret working wonderfully but i am regretting doing a gem update today. I had alot of trouble first installing it and was really happy to have it working. The upgrade was from 0.3.1 to 0.4.0. The problem is; in the rails console, >> @results = Book.find_by_contents("peter pan") => #<ActsAsFerret::SearchResults:0x487040c @total_hits=0, @results=[]> Its indexing