Displaying 10 results from an estimated 10 matches for "aaf_configur".
2007 Sep 14
0
How to call optimize
...mpression that Model.rebuild_index will automatically
call optimize in the end. But that doesn''t seem to be the case.
After running Model.rebuild_index how do I optimize the index. I am
using aaf most stable and also ferret most stable.
def rebuild_index(*models)
models << aaf_configuration[:class_name] unless
models.include?(aaf_configuration[:class_name])
models = models.flatten.uniq.map(&:constantize)
logger.debug "rebuild index: #{models.inspect}"
index =
Ferret::Index::Index.new(aaf_configuration[:ferret].dup.update(:auto_flush
=> false,...
2007 May 10
0
Large index performance = 8x decrease
...e help!
-m
--- MODEL CODE
class MyModel < ActiveRecord::Base
# think of body/title in terms of an average blog
acts_as_ferret :fields => { ''body'' => {}, ''title'' => { :boost => 2 } }
end
--- INDEX CODE
index =
Ferret::Index::Index.new(MyModel.aaf_configuration[:ferret].dup.update(:auto_flush
=> false, :field_infos => MyModel.aaf_index.field_infos, :create =>
true))
n = 0
BATCH_SIZE = 1000
while true
# new index from scratch
records = MyModel.find(:all, :limit => BATCH_SIZE, :offset => n,
:select =>
"id,#{MyModel.aaf_conf...
2007 May 18
5
how to compile with large file support?
Hi,
I''m trying to figure out how to compile ferret with large file support,
but none of the topics that discuss this actually say How this is done.
Can someone please provide the info?
thanks.
-m
my exact problem:
http://www.ruby-forum.com/topic/94143#191630
this topic also discusses the issue:
http://www.ruby-forum.com/topic/84237#151791
this topic says that the FAQ should have the
2008 Jan 09
5
Parallel indexing doesn''t work?
Hi,
I''m trying to get parallelized ferret indexing working for my AAF
indices, based on the example in the O''Reilly Ferret shortcut.
However, the resulting indices after merging seem to have no actual
documents.
I went and made minimal changes to the example in the Ferret shortcut
pdf, and indeed can''t get that to work either. I''d appreciate any help
2007 Nov 07
2
Ferret-talk Digest, Vol 25, Issue 2
> From: Jens Kraemer <jk at jkraemer.net>
> Subject: Re: [Ferret-talk] Performance before and after optimization
> On Sat, Nov 03, 2007 at 08:49:17PM +0800, Alex Neth wrote:
> [..]
>> 2) Can I keep a second index so that it doesn''t get locked during
>> optimization and then switch to the optimized index? Perhaps the
>> index
>> is not really
2007 Nov 10
1
Ferret-talk Digest, Vol 25, Issue 3
...Neth <alex at liivid.com> wrote:
>> Thanks Jens. Any suggestion on how to get a two index solution
>> working with acts_as_ferret?
>
> I rolled my own with methods in my model class, something like this:
>
> def self.setup_new_index(location)
> config = aaf_configuration[:ferret].dup
> config.update(:create => true, :auto_flush => false,
> :field_infos => ActsAsFerret::field_infos([self]),
> :path => location)
> index = Ferret::Index::Index.new(config)
> index.logger = Logger....
2007 Oct 03
3
The ferret logs
Hi.
We''ve had some problems with ferret not being able to load our classes
(stack trace below for the curious).
I nailed it down to a deployment issue, where an old instance of ferret
drb was running. I don''t understand the details quite yet, but the
result was the the old ferret was never shutdown during redeployment,
and attempts were made to start up a new one.
Anywho,
2007 Jun 24
4
Resetting ferret index before test runs
I need to reset the ferret index between test runs.
It seems like there are a few ways to reset the ferret index.
* Deleting the index directory -- is this really bad form?
* calling rebuild_index
* (any others?)
What would y''all recommend? (Sorry, I''m from Texas)
Preferably, I''d like a way to reset the index that I can integrate
into a selenium test.
-David
2007 Nov 11
6
Reducing dependency on remote ferret process
Hi.
We use FerretDrb for search. If the ferret process is down, our entire
application comes down the moment we try to save a model which is indexed.
Is there a way to decouple this relationship such that we can somehow
resume normal operations despite ferret being down and not index the model?
Thanks.
Morten
2007 May 09
6
more_like_this
Hi,
I''m using acts_as_ferret in my rails application and I''d like to use
more_like_this to retrieve some ''similar'' item suggestions. I have a
class ''items'' which has a status field and I need to retrieve items that
only have one of the two possible statuses.
Looking at the more_like_this method indicates it supports an
:append_to_query