Displaying 20 results from an estimated 6000 matches similar to: "multi-model search best practices"
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.
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 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 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 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
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 May 18
2
acts_as_ferret 0.2.1
The svn repository for acts_as_ferret has just been tagged with version
0.2.1. This is the first version of aaf to support the 0.9.x branch of
Ferret.
See http://projects.jkraemer.net/acts_as_ferret/wiki
*Features*
* High speed full text search across the contents of any Rails model
class, without any hassles. The index will be kept up to date
automagically while you work with your Rails
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 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 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 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 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 Oct 09
2
AaF not indexing models when no index present in multi_searc
The first time I tried to run a multi_search, I got an error and
discovered there were no indexes for any of the models. index > model
folders were there but no actual indexes. I couldn''t figure out how to
get it to create indexes so I edited a record for each model which
created all the indexes. Then when I ran the search, everything worked
well.
Is there a bug related to this
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 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 Sep 12
5
ferret / acts_as_ferret multiple server deployment
Has anyone deployed ferret & act_as_ferret to a load balanced multiple
server environment? If so, did you simply use a shared network index?
I have a couple of ideas on how to deploy - but each have shortcomings
and I''m hoping to find out if anyone else has deployed ferret in this
manner. The application is simply load balanced between multiple
servers running the same app for
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 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
2006 Oct 14
9
How can I do my own search limits?
I''m trying to add a way to query across associations for a model in
acts_as_ferret. Say I have a model A and it has a relationship with
model B. Like say a Book has many pages. I want to search across the
pages of the Book and produce a list of unique books who''s pages match
the terms. So if I have a page that hits then I will add that book to
my list of results. Right