Displaying 20 results from an estimated 8000 matches similar to: "how to index and search multiple foreign keys in aaf"
2007 Feb 04
10
[AAF] remote indexing via DRb with acts_as_ferret
Hi!
Aaf trunk has undergone several major refactorings the last days, with
the result that you can now transparently switch your app from local
to remote indexing and back :-)
If you plan to scale your app to more than one physical machine, or
if you have problems with corrupted indexes and the like under high
load, you really should give this a try.
I wrote some documentation to get you
2007 Jul 29
7
RDig and AAF playing together
I have a site with two indexes. Index A is created offline by RDig
and queried from the web via RDig (specifically,
RDig.searcher.search). Index B is managed by AAF with :remote =>
true. Simple enough. However, I need to query both indexes from RDig.
Usually this is ok, as I modified RDig to accept an array of
search_paths with an element for index A and index B.
However, when Index
2007 Jul 13
8
More sorting problems with untokenized index
I''m having problems sorting on untokenized fields. I have one field that
sorts fine, but there are others that seem to sort on a different field.
Here''s the index description:
acts_as_ferret
:remote=>true,:fields=>{:name=>{:boost=>2},:name_for_sort=>{:index =>
:untokenized},
:city=>{:boost=>2}, :city_for_sort=>{:index=>:untokenized},
2007 Mar 09
5
higlighting problem
Hi,
I''ve been having a problem getting highlighting to work with aaf.
I have a class defined as follows such:
class Link < ActiveRecord::Base
acts_as_ferret :fields => { :description => { :store => :yes } }
end
I get back the correct results when I do Link.find_by_contents, however,
I''d like to highlight them.
If I do something like iterate through the list 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
2007 Mar 26
6
[AAF] acts_as_ferret 0.4.0 released
Hi folks!
Just wanted to let you know that I released aaf 0.4.0 on last weekend.
Besides the DRb server it also includes a new lazy loading feature that
lets you do ferret searches without actually loading any records from the
DB. Useful e.g. for live searches:
model:
class MyModel
acts_as_ferret :fields => { :title => { :store => :yes }, :content => {} }
end
controller:
2007 May 23
2
issues with searching custom fields
Hey all,
I''m using acts_as_ferret this way:
class Job < ActiveRecord::Base
acts_as_ferret :fields => [:title, :workers_name]
def workers_name
return self.workers.inject("") {|names,b| names + " " + b.first_name}.to_s
end
end
But when I do Job.find_by_contents("workers_name:patrick")
I get nil.
Yet when I do:
j=Job.find :first
j.workers_name
I do
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 Nov 13
8
acts_as_ferret : cannot use a customized Analyzer (as indicated in the AdvancedUsageNotes)
Hi all,
I cannot make aaf (rev. 220) use my custom analyzer, despite following the
indications @
http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage
To pinpoint the problem, I created a model + a simple analyzer with 2 stop
words : "fax" and "gsm".
test 1 : model.rebuild_index + model.find_by_contents("fax") # fax is a
stop word.
=> I get a
2007 May 05
4
Stop words, fields, StandardAnalyzer quagmire
Hello,
I''m using: Ruby 1.8.6, Rails 1.2.3, ferret 0.11.4, acts_as_ferret from
svn stable.
I''ve had quite a day wrestling with trying to remove the use of
stopwords. The problem was that when searching for words like "no" or
"the", no results were found. I found a confusing thing behavior that
has taken me some time to figure out, and I hope sharing it
2007 Jun 15
2
indexed ''text'' (not string) column not used when searching, unless explicitely specified!!
Hi all,
I''ve included a mysql ''text'' column in my index, and aaf/Ferret
doesn''t use it when I search, UNLESS I specify it as a restrictor, and
then it only searches in that field!
For example:
=> 0 results are returned by a standard (__all__ fields ?) search
>> Entity.find_by_contents "zixi"
Query: zixi
total hits: 0, results
2007 May 02
4
Wrong total_hits when using conditions in find_by_contents
In my model Topic:
acts_as_ferret({ :fields => {:username => {:store => :yes, :boost =>
30}, :subject => {:store => :yes, :boost => 20}, :body => {:store =>
:yes, :boost => 10}}, :remote => true }, { :analyzer =>
Ferret::Analysis::RegExpAnalyzer.new(/./, false) })
def self.full_text_search(q, options = {}, find_options = {})
return nil if q.nil? or
2007 Sep 05
6
aaf index rebuild problems on windows
hello list!
i''m still having massive problems with index rebuilds.
after i recently switched to the DRb mode i was hoping to get rid of the
problems with locked files and such.
but even with DRb and the latest stable version of acts_as_ferret my
index rebuilds are failing
C:\Informer>ruby script/console production
Loading production environment.
>> LegacyInfobase.rebuild_index
2007 Jul 04
2
problems after gem update
Hi, I had ferret working wonderfully but i am regretting doing a gem
update today.
I had alot of trouble first installing it and was really happy to have
it working. The upgrade was from 0.3.1 to 0.4.0.
The problem is;
in the rails console,
>> @results = Book.find_by_contents("peter pan")
=> #<ActsAsFerret::SearchResults:0x487040c @total_hits=0, @results=[]>
Its indexing
2007 Feb 22
5
Combine ferret with database
Hello list,
I wonder if someone has some tips on joining a ferret search with a
database.
I have a rails project using a postgresql backend and I would like to
utilize the superb performance of ferret for fulltext searching.
The problem is that I have to joined the result with the database as
I have some user access rights to different documents to take into
account.
Does anyone have
2007 Apr 30
1
Can''t search fields with space
Hi,
I have a user model that has a city field which is searchable using
acts_as_ferret.
But I can''t get it to return any result whether I use
:city => {:store => :no, :index => :untokenized},
or
:city => {:store => :no} in my User model''s acts_as_ferret option
>>> User.find_by_contents("city:(cal poly)")
=>
2007 Mar 28
7
Newbie problem on production server
Hi,
I just installed ferret for the first time and integrated it with my
app. On my dev machine it''s fine but on my production server I get this
when I call find_by_contents():
Processing LinksController#results (for 24.185.105.59 at 2007-03-28
05:28:36) [POST]
Session ID: 3f2dc7c17147c0e52178ba697a119833
Parameters: {"commit"=>"Search",
2007 May 25
1
how to update index with acts_as_ferret?
Hey all,
I have movie has_many :medias and media belongs_to :media
this is how my movie class looks like:
class Movie < ActiveRecord::Base
has_many :medias
acts_as_ferret :fields => [:title,:medias_name]
def medias_name
return self.medias.inject("") {|name,m| name + " " + m.name}
end
end
when I do Movie.find_by_contents("title:bob") it does return a movie
2006 Aug 30
7
AAF Sorting by date - what am I doing wrong?
I''m trying to sort my search results by Date, in descending order. I''ve
done quite a bit of reading through the forums here, and I''ve tried two
different suggestions.
This just returns results in the same order as a search without a sort:
sort_fields = []
sort_fields <<
Ferret::Search::SortField.new("ferret_created_at",:reverse => :true)
2007 Apr 01
2
strange behavior after switching to DRb server
After switching to the DRb server, I am experiencing strange behavior
when sorting on score. My app was working as expected before the switch.
Both before and after the switch, my app sorts properly on other
fields, such as date.
For sorting on score, I am using the following option
find_by_contents option:
:sort => Ferret::Search::SortField::SCORE
Before switching to DRb, this worked