search for: multi_search

Displaying 20 results from an estimated 46 matches for "multi_search".

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...
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...
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 whil...
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[:q...
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 pr...
2006 May 18
1
multi_search problem
I am running into the following error when I try to search across multiple models with multi_search() I have rebuilt the indices and can search on each model individually using the Rails console. Here is the output from the console. >> Post.multi_search(''new'', [Message, WikiPage]) ArgumentError: wrong number of arguments (1 for 0) from ./script/../config/../con...
2006 Sep 20
5
acts_as_ferret limit on multi_search not working?
I''m using acts_as_ferret to do a query like this: Model1.multi_search("my query",[Model2,Model3], :limit => 2) No matter what number i set limit to I get 10 items in the resultset. Am I doing something wrong? Thanks/David -- Posted via http://www.ruby-forum.com/.
2007 Feb 28
5
How to use find_options in multi_search
Hello everyone, I''m using multi-search to search in some attributes of two classes. One of the attributes is the id of the customer. For each multi_search I want to do a give the id of the current customer as a parameter. This should only return results for the given customer. My current code looks like this: Folder.multi_search(@search_query, [Myfile]) I noticed in the API you can add options and find_options to this. How do I use these parameter...
2007 Apr 12
19
Multiple Model Search
...; 3. Can I still boost certain fields within various models? As the boost for fields is set in your call to acts_as_ferret in the specific model you want to index, there''s no problem setting this in various models. Btw, if you want to search across multiple Model classes at once, use the multi_search method instead of find_by_contents. Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
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...
2006 Oct 10
1
sorting results with aaf multi_search
Is it possible to sort the result of acts_as_ferret multi_search the way you can with find_contents? I''m using the latest ferret and aaf. I have an interface that offers multiple search options which search different fields of a single model. In addition to these, I also have an "all" search type which is meant to pull in one additional m...
2007 Apr 16
5
AAF: merge search results
...s a state field. so I want to provide a detailed search form each field in the user and its related models can be specified. Suppose I have a user that has a name "california", and that user has a address with the state field being "california" as well. I use AAF''s multi_search: User.multi_search(''state:(california)'', [Address, Task]) returns the correct address instance User.multi_search(''name:(california) '', [Address, Task]) returns the correct user instance User.multi_search(''name|state:(california) '', [Address,...
2006 Dec 07
5
Search Multiple Models
Hello folks, I have four models, each with their own separate index. Models = Articles, Blogs, MusicTracks, and MediaFiles I have individual searches within each section of the site working just fine, but I want to have a gloabl search that searches across all of them at the same time and returns the results ordered by score. Here''s how far I am now... def search query =
2007 Oct 15
0
Inconsistent results between multi_search and find_by_contents (is "other" a reserved word?)
I have a Computer type and I''m trying to query agianst it. When I do the query with find_by_contents, I get correct results. However, when I query using multi_search, I get incorrect results. I''m using the most recent version of Acts As Ferret and Ferret This returns the correct results: Computer.find_by_contents( "device_type:laptop AND os_type:other" ) This returns too many results: Computer.multi_search( "device_type:laptop AND os_...
2007 Sep 06
1
multi_search with dfferent model conditions
Hi, Is there a way to pass multi_search separate conditions for each model? -- R. -- Posted via http://www.ruby-forum.com/.
2007 Dec 19
3
multi-model search best practices
Hi folks. If I am indexing ModelA and ModelB and I want to search both of them, I usually just pick one arbitrarily and use it for #multi_search. Is there a slicker pattern, regarding from which model to invoke #multi_search? Can it be invoked directly from the Ferret library? Has anyone put together some sort of "dummy" search class? Thanks for any ideas. John
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_...
2006 Oct 16
10
Sorting by score
Hi I think this is a very easy question but here goes: I want to sort my results by a boolean field and then by score, I thought this would be a default configuration but apparently not. sort_fields = [] sort_fields << Ferret::Search::SortField.new(:sponsored, :reverse => :true) that is my current code, how do iu alter it so that the results are then sorted by highest score first?
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 Aug 20
0
providing ferret filters on multi_search
Hi, I want to do a multiple model search.It works if i give the plain text(query) that i am searching for. But i also want to specify some filters with the query and they are separate for both the models that i am searching. How do i achieve this?Can anyone please help? Thanks Isha -------------- next part -------------- An HTML attachment was scrubbed... URL: