Displaying 20 results from an estimated 300 matches similar to: "multi_search problem"
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
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
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''
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?
2006 Dec 16
10
Getting "ArgumentError ( isn''t a valid directory argument.
I''m hoping someone has encountered this before. I''m using AAF trunk and
trying to multi_search across 2 models. It works fine on my windows
(Webricks) dev env but now that i''ve deployed to linux, (Apache,
FastCGI) I''m getting the following error:
ArgumentError ( isn''t a valid directory argument. You should use either
a String or a Directory):
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
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 =
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
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 model and consider all indexed
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 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 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 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 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
2007 Apr 16
5
AAF: merge search results
Hi,
I have a user model that has a couple of other models(like street
address, tasks).
suppose
User has a name field
Address has 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
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 Oct 03
3
Pagination problem with acts_as_ferret
Hi,
am using this wonderful plugin acts_as_ferret and according to the
tutorial at http://railsenvy.com/2007/2/19/acts-as- ? rial#basic
I worked it out except the pagination feature.
If I have 12 records and I give limit to 10, its correctly displaying 10
records in the first page and is giving the link to the second page too.
But when I go to the next page I find the same 10 records instead of
2007 Dec 02
1
total_hits and conditions
Hi. I''m running 0.11.4. The problem I''m having, appears to have been solved
before according to various posts I googled up, but possibly the fix got removed
from 0.11.3 to 0.11.4?
re = Entry.multi_search(''service'', [Ticket], options, {})
re.size
620
re.total_hits
620
Now add conditions:
re = Entry.multi_search(''service'', [Ticket],
2007 Apr 12
19
Multiple Model Search
[from out-of-band communication with steven, just for the record]
Hi!
On Wed, Apr 11, 2007 at 01:47:49PM +0200, Steven Garcia wrote:
> Hey Jens,
>
[..]
>
> 1. Is the Search model just an Active Record object or do I need to
> set up a database for it as well (if so then with what columns)?
No, that search model is just a plain class that backs your search form.
If you want to
2006 Oct 02
3
Adding dependant objects to an Index?
I have design question and I''m wondering what''s the best way to solve
it. I''m trying to index HTML content where I have a single model object
call it Article that is an acts_as_ferret model, and an article consists
of many HTML files. I would like to index all of the content of the
article with ferret and search across it. However, since the article''s