search for: store_class_name

Displaying 20 results from an estimated 35 matches for "store_class_name".

2006 Oct 09
7
multi_search problems, Never go away!
Hello, I am trying to use the multi_search method, but I keep getting type error on nil objects, I send it [Model1,Model2] and it seems as though the class names keep getting clobbered and turn to nil, somewhere along the multi_index area. I tried to trace what was going on, but I got nothing, also, this only happens when there are actually hits(thank god, most of the time). Perhaps some insight?
2007 Mar 21
2
store_class_name for Comatose:Page model
Hi, I have three models: Comatose::Page, Article and Product. In all of them, store_class_name is set to true. Now, when i do: results = Comatose::Page.multi_search("*", [Article,Product], options) I get: wrong constant name Comatose::Page #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:438:in `const_get'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/...
2006 Oct 13
5
multi_search error undefined method
Hi, Im having problems using the multi_search command. I keep getting the following error. "undefined method `<<'' for Book:Class" here is the code associated with this. class Book < ActiveRecord::Base acts_as_ferret :store_class_name => true end class User < ActiveRecord::Base acts_as_ferret :store_class_name => true end and the call is the following t=User.multi_search(@query,Book). I tried deleting my browser session and rebuilding the index (by deleting it). Im still getting the same error. Any ideas? --...
2006 May 26
1
multi_search will not work
I am trying to get multi_search to search across multiple models. I have the following: class Drug < ActiveRecord::Base acts_as_ferret :store_class_name => true end class Target < ActiveRecord::Base acts_as_ferret :store_class_name => true end and I am trying to query via: @drugs = Drug.multi_search(params[:query], [Target]) But I get no results. If I go: @drugs = Drug.find_by_contents(params[:query]) I get results back no problem (...
2006 Dec 08
6
QueryParser Exception Handling Problem
According to the following link: http://ferret.davebalmain.com/api/classes/Ferret/QueryParser.html :handle_parser_errors => true is enabled by default and seems to be in acts_as_ferret in class_methods.rb of the plugin. However, when I pass a special character as a query (e.g., !, -, <, >, etc) it throws an error and pukes. -- snip -- Error occured in src/q_parser.y:279 - yyerror
2006 Aug 19
11
Need help with multi_search
I have been trying to use multi_search to search accross multiple associated models, but I have had no luck at all. I have scoured the net and this forum for all similar posts, but none of them contain enough code for me to get it to work. I am successfully able to search individual models, and then display the results without a problem. I have the following 2 models, Product and Component.
2007 May 05
4
Stop words, fields, StandardAnalyzer quagmire
...gt; 10}, :type => {:boost => 2}, :email => {:boost => 10}, :bio => {:store => :no}, :status_id => {:boost => 1}}, :store_class_name => true, :remote => true, :ferret => { :analyzer => Ferret::Analysis::StandardAnalyzer.new([]) } } ) With the StandardAnalyzer added, I do find results with "no" or "the". The complicating factor is that as you...
2009 Apr 09
4
Weird analyzer issue with the word ''fly''
...m.com/topic/80178 I''m having a problem with some search terms - i narrowed one of them down to the inclusion of the word ''fly''. Can anyone give me any clues at to what might be happening, or even how i can investigate? My index is set up like this: acts_as_ferret({ :store_class_name => true, :analyzer => Ferret::Analysis::StemmingAnalyzer.new, :fields => {:name => { :boost => 2.0 }, ... }}) And this analyzer is defined in a module thus: module Ferret::Analysis cla...
2006 Jun 29
2
Possibly same issue as ''duplicate search results'' topic?
...t index entries rather than replacing the old one. As a result, searches get hits when you search on a historical value that is no longer the value of the field. I assume that I am somehow misusing acts_as_ferret? My call to add the mixin to the model class looks like this: acts_as_ferret :store_class_name => true, :fields => [''id'', ''code'', ''description''] As a test (and a workaround), in acts_as_ferret.rb module InstanceMethods, I replaced: alias :ferret_update :ferret_create with: def ferret_update self.ferret_destroy self.fe...
2007 Aug 18
0
Problem with multi-search
Hi all, I have indexes on 2 models e.g Message model acts_as_ferret(:store_class_name => true, :fields =>{:message => {:store => :compressed}, :felix_user_id => {:index =>:untokenized_omit_norms,:store => :no}) and the chat model acts_as_ferret(:store_class_name => true, :fields => {:name => {:s...
2007 Mar 27
1
multi_search problems
Hello. I''ve been trying to get multi_search to work and I simply can''t. I have two models: Post acts_as_ferret :fields => [:title, :body], :store_class_name => true Page acts_as_ferret :fields => [:title, :body], :store_class_name => true If I do @results = Post.find_by_contents(params[:q]) or @results = Page.find_by_contents(params[:q]) it works fine, but if I try to search in both models @results = Page.multi_search(params[:q],[Post]) I ge...
2007 Jan 17
5
[ActsAsFerret] Globalize integration
...k of the best way to make this available to others. If others think this is worthwile, I''d be interested in adding this as something optional to acts_as_ferret. P.S. Currently, I''ve added the option like so: class Foo acts_as_ferret :single_index => true, :store_class_name => true, :localized => true, #=> this activates the option. :fields => {...} end Regards, Saimon (http://saimonmoore.net) -- Posted via http://www.ruby-forum.com/.
2007 Jun 07
3
:store => :yes doesn''t work in some cases
I''m not really sure if this is a bug, but it makes my search results look a bit strange. I have an acts_as_ferret declaration that looks like: acts_as_ferret :store_class_name => true, :remote => true, :fields => { :ferret_name => { :store => :yes, :boost => 2 }, :ferret_content => { :store => :yes } } I store both fields so that I don''t need to load each result model from the rails DB when displaying the results. This is...
2007 Jun 24
6
I only want one type of model returned from a multi_search
I am trying to use acts_as_ferret''s multi_search to search across multiple models, but i only want it to return one type of model. for example i have a page that lists out people. on this page it shows email addresses and phone numbers. I want to be able to search by any fields directly from the person model and search the fields from the email_address and phone_number models, but I only
2006 Apr 26
8
Search multiple models
Hello, Lets say you have a few models like Post, Article, Wiki, Comment, And you want to use ferret to search all of them at once. How would I set up the latest acts_as_ferret to accomplish this? And what would be fastest for searches? 1 index for all models, or have an index per model? Thank you -- Posted via http://www.ruby-forum.com/.
2007 Jul 02
8
Strange intermittent no search results problem
...:answer => {:boost => 1, :store => :no}, :status_id => {:boost => 1}, :category_id => {:boost => 1}, :published => {:boost => 1}}, :store_class_name => true, :remote => true, :ferret => { :analyzer => Ferret::Analysis:: StandardAnalyzer.new([]) } } ) I''ve been wrestling with a very strange intermittent problem for a few days now. I''m running 3 mongrels behind...
2007 Aug 03
2
can''t search for OR (as in the state)
I''m trying to search a Model by the state field using Acts As Ferret. The query for this is ''+state:NY'' (substitute state abbreviation for NY). This works find however ''+state:OR'' returns nothing, though just ''portland'' will pull up matches within that state. I''m pretty sure it''s reading OR as an or conditional
2007 May 22
1
Bug in Ferret::Search::SortField::SCORE ??
...o matter what i do, i can''t get the results to be ordered by their ferret_score, even though i can display that score just fine in my views. i''m really confused and getting frustrated. maybe someone can shed some light on it. thanks! here is a sample model : acts_as_ferret :store_class_name => true, :fields => [:title, :body] and the main view : <% for r in @results %> <%= r.ferret_score %> <p><%= render_partial Inflector.underscore(r.class), r %></p> <% end %> Jon -- Posted via http://www.ruby-forum.com/.
2007 Apr 12
0
Does Ferret have problems with #alias_method_chain ?
Hi all, I have this in my class: class Party < AR::B acts_as_ferret :store_class_name => true, :remote => true, :fields => (self.content_columns.map(&:name) rescue []) + %w(main_identifier) class << self # #count is also defined, omitted for clarity def find_with_destroyed_scope(*args) with_destroyed_scope do find_without_destroyed_s...
2007 Jan 28
1
Is this the best approach?
...single object. No object can be manipulated without knowledge of what user is making the request. This makes searching difficult because I''ve got to filter the results based not just on the search params but by user permissions as well. At this point I plan on using a single index, with :store_class_name enabled for all models. The tricky part is limiting the search results to only the items the searching user has access to. I think the easiest way to do with would just to store an "owner_id" along with every entry in the index, which would be the User''s ID in my database. So for...