Displaying 20 results from an estimated 4000 matches similar to: "multi_search with dfferent model conditions"
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
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
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 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 =
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/.
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
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 May 16
7
return ONLY total_hits without querying from real database
Hey guys,
I know I can run search(q).total_hits, but if I try to put :limit=>0 it
gives me an error. I don''t want it actually query any of the results, I
just want it to tell me how many total_hits I would have if I wanted to
search it.
How can I do this?
--
Posted via http://www.ruby-forum.com/.
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
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 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
2007 Sep 28
4
undefined method error
Hi,
I''m running the trunk version with drb server. In my ferret_server.log I
get a lot of messages like this:
#method_missing(:add, ["User", {:first_name=>"blah", :comments=>nil,
:company=>"blah", :phone_day=>""}])
Over and over again.
But more importantly, since yesterday doing a search has caused an
exception:
A NoMethodError
2007 Jul 02
8
Strange intermittent no search results problem
Hello,
First the specs:
ruby 1.8.6, rails 1.2.3, ferret 0.11.4, mongrel 1.0.1, mongrel_cluster 0.2.1
And the model''s aaf config:
# Ferret search engine
acts_as_ferret({:fields => {:name => {:boost => 10},
:summary => {:boost => 2},
:body => {:boost => 1, :store =>
:no},
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''
2007 May 02
6
Rewarding exact matches
Is there a way I can get ferret to give the highest ranking to an
exact term match?
The problem I have right now is that I am searching both title and
body fields, so even if I boost the title field, if the body has more
instances of the query, then it gets pushed up in rank.
I would like for ferret to put exact matches (of the title field) at
the very top of the pile, so if I do a
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 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 Jul 27
6
Problem with installing acts_as_ferret plugin
Hi all,
when I type this:
ruby script/plugin install
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret
from my rails project the plugin is not getting installed, its simply
going back to my rails application.
I don''t find the plugin in the vendor/plugin directory
I am using Instant Rails for your information. Could anyone please let
me know whats going wrong...