search for: ferret_fields

Displaying 6 results from an estimated 6 matches for "ferret_fields".

2007 Aug 10
3
Different ferret fields for instances of the same model?
...ose we have a model "Product", in "Product" I''ve declared a polymorphic relationship with model "Property1" and "Property2", the following code will show this: class Product < ActiveRecord::Base belongs_to :property, :polymorphic => true @@ferret_fields = {...} acts_as_ferret({:fields => @@ferret_fields}) end class Property1 < ActiveRecord::Base has_one :product, :as => :property end class Property2 < ActiveRecord::Base has_one :product, :as => :property end Now I want to provide full text search capability for "Produc...
2007 May 10
13
Is there a way to do incremental search?
Say the user first enters "ruby" for search and gets 1000 results. Then he can search "rails" just in the 1000 results just returned. The common scenario is some kind of advanced search. User can incrementally add criteria and the program will narrow the results step by step. I know that at least I can use all the criteria as a whole to do the searching, but this is a waste
2007 May 10
0
Large index performance = 8x decrease
...et].dup.update(:auto_flush => false, :field_infos => MyModel.aaf_index.field_infos, :create => true)) n = 0 BATCH_SIZE = 1000 while true # new index from scratch records = MyModel.find(:all, :limit => BATCH_SIZE, :offset => n, :select => "id,#{MyModel.aaf_configuration[:ferret_fields].keys.join('','')}") break if (!records || records.length == 0) records.each do |record| index << record.to_doc # aaf method end n += BATCH_SIZE end index.flush index.optimize # 30+ minutes =( index.close --- CONFIG > gem list | grep ferret acts_as_f...
2007 May 18
5
how to compile with large file support?
Hi, I''m trying to figure out how to compile ferret with large file support, but none of the topics that discuss this actually say How this is done. Can someone please provide the info? thanks. -m my exact problem: http://www.ruby-forum.com/topic/94143#191630 this topic also discusses the issue: http://www.ruby-forum.com/topic/84237#151791 this topic says that the FAQ should have the
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 May 09
6
more_like_this
Hi, I''m using acts_as_ferret in my rails application and I''d like to use more_like_this to retrieve some ''similar'' item suggestions. I have a class ''items'' which has a status field and I need to retrieve items that only have one of the two possible statuses. Looking at the more_like_this method indicates it supports an :append_to_query