Displaying 20 results from an estimated 2000 matches similar to: "how to update index from a script"
2006 Nov 28
4
Update/Create record only if field is true
I have a sellable flag in my database. I''m trying to have ferret only
add/update records where sellable == true. What is the best way to do
this? I''ve tried editing instance_methods.rb in the AAF, but I still
can''t get it to work.
Thanks for the help
--
Posted via http://www.ruby-forum.com/.
2007 Nov 11
5
undefined method `add''
We''ve been running into problems with ferret indexing lately. The
problem is intermittent and some times it persists. Just got this after
wiping the index and redeploying:
NoMethodError (undefined method `add'' for Solution:Class):
(druby://10.1.65.87:9009)
/data/releases/20071111152414/vendor/rails/activerecord/lib/active_record/base.rb:1238:in
`method_missing''
2007 Jan 11
5
ASF: cannot determine document number from primary key
I''m getting this exception from acts_as_ferret:
A RuntimeError occurred in search#similar:
cannot determine document number from primary key:
#<MyClass:0x9feba20>
[RAILS_ROOT]/vendor/plugins/acts_as_ferret/lib/instance_methods.rb:132:in
`document_number''
As a result of this call:
object.more_like_this
The relevant backtrace:
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
2007 Jun 13
14
Do delegates work properly in Drb mode?
Hi folks,
I have several models that index well in Drb mode.
However, I have one scenario where it works in normal mode, but not in
Drb mode.
model A
field :one
end
model B
belongs_to :a
field :two
delegate :one, :to => :a
acts_as_ferret :fields => { :one => {}, :two => {} }, :remote => true
end
If I leave off the :remote parameter, it works. Or, if I don''t
2007 Jun 07
5
Advise on slowness in bootstrapping?
I am looking at trying to use ferret/aaf to supplement my querying against a
medium and large table with lots of columns. Some facts first:
Ferret 0.11.4
AAF 0.4.0
Ruby 1.8.6
Rails 1.2.3
Medium table:
105,464 rows
168 columns (mostly varchar(20))
11 actual columns indexed in aaf plus
40 virtual columns indexed in aaf (virtual is concat of two physical columns.
e.g. cast_first_name_1 +
2006 Sep 18
16
Dynamic fields and AAF
Hi,
I have a model which has properties, these are your standard name/value
pairs, but also have attributes that affect how I want to store them in
ferret. I was using 0.9.5 with 0.2 of aaf, which seemed fine, I just
copied and pasted (yes, I know, ick) the to_doc method and added code to
iterate though the properties that that model had, and add relavent
fields to the document.
It seems
2007 Jan 05
7
Hitting Files per Directory Limits with Ferret?
Hey all!
We''ve been using Ferret to great success these past six months. But
recently we''ved tried adding many new ContentItems (only thing being
index by Ferret at the moment), and things came crashing to a halt.
ferret gem: 0.10.9
acts_as_ferret plugin (not sure which version)
How we''re using the plugin:
class ContentItem < ActiveRecord::Base
acts_as_ferret
2006 Aug 25
7
disabling automatic indexing in acts_as_ferret
I''d like to be able to enable/disable the automatic indexing of
documents acts_as_ferret does. Something like MyModel.disable_indexing
MyModel.enable_indexing would be perfect. I need this because I do some
indexing that requires visiting the parents of the model objects and my
import method imports the children first, so the information isn''t there
yet. I''d like to
2006 Oct 31
2
corrupted index preventing save
Hi, I''m using Rails/AAF with Ferret 0.10.11, and my index occasionally
(every few weeks, roughly) becomes corrupted.
If the index is busted, until I rebuild it our users are unable to save
anything. I get errors like the one below, and the save rolls back.
My question is, is there any way to catch the error, and continue with
the save even if the model isn''t indexed? What
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
2006 Sep 20
2
bad interaction of ferret (0.10.5) and mongrel on linux
We have an application that uses Ferret and acts_as_ferret that we
just upgraded to Ferret 0.10.5 (from 0.9.5) and the corresponding
version of the acts_as_ferret. Everything works as expected on my
laptop, which is running mongrel 0.3.13.3. When I deploy the
application on our server, which is running some version of Red Hat
Linux, I can''t get Ferret to work at all when
2007 Apr 01
9
Important issue with [AAF] and :select
This is important and may be affecting you if you use :select to
minimize the columns you need on big queries.
If you use :select to define which columns you need and you have not
included all the columns you defined in the :acts_as_ferret field
definitions you''ll clear the content of those fields on the ferret
index. And that may corrupt your index.
So, if you have in your model:
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
2007 Aug 10
3
Different ferret fields for instances of the same model?
Hi all,
So far as I know, while using acts_as_ferret, we should add the
following declaration in the ActiveRecord model which is going to be
indexed:
acts_as_ferret({:fields => @@ferrect_fields})
in which @@ferrect_fields is a hash containing all the field to be
indexed. This is pretty much for some simple situations. But I got a
more complex situation that I want to define the fields to be
2007 Aug 23
7
custom sort routine
is it possible to write a custom sort routine for ferret?
I use ferret right now to index all my products. One of the variables
in these product documents is the product popularity, where 1 = best
selling production, 2 = 2nd best, etc..
Right now, I''m just sorting by the popularity column in my search
results, although this doesn''t always provide "good" results,
2006 May 24
10
Ferret slow after a while
I''m building a new index from scratch based on a number of documents
stored in a database loaded using my Rails env (using Ruby Ferret 0.9x
(installed today with Gem) on Windows). At first everything goes nice
but after a number of documents it starts to go slower and slower until
it grinds to a halt (at least feels like it).
Am I doing something wrong? Is there some way to work
2007 Apr 07
19
Constant 0.11.4 Errors
Folks,
Since upgrading to ferret 0.11.4 on Mac OS X Tiger, I''ve been running
into constant crashes when running my Rails tests. Here''s an example of
the output.
-- snip --
1) Error:
test_published_blog_can_be_ferreted(BlogTest):
Ferret::FileNotFoundError: File Not Found Error occured at
<except.c>:117 in xpop_context
Error occured in fs_store.c:329 - fs_open_input
2006 Mar 01
9
Updating Index Is Very Slow
Hi,
I am experiencing very poor performance when updating my index. For
example, to update the index for 10 documents, it is taking 3 to 4
seconds. My index is currently very small... with probably less than
100 docs in it.
I have created my index as follows:
GIFT_INDEX = Index::Index.new(:path => "#{index_dir}/gift", :key =>
''id'', :auto_flush => true)
2006 Oct 05
4
search results autocompletion
Dear list,
I ''m using a text input field with autocompletion . The suggestions come
from a ferret index which is created by getting all the terms belonging to
other indices. Here is the code:
class Suggestion
attr_accessor :term
def self.index(create)
[Person, Project, Orgunit].each{|kl|
terms = self.all_terms(kl)
terms.each{|term|
suggestion =