Displaying 4 results from an estimated 4 matches for "found_on".
Did you mean:
found_os
2005 Dec 08
2
Confusing lock problem in rails
...:create_if_missing => true,
:auto_flush => true,
:close_dir => true)
# syncronization with ferret index
def after_save
@@index << {:id => id, :email => email, :contents => contents,
:date => found_on}
end
def after_destroy
@@index.delete(id)
end
def self.optimize_index
@@index.optimize
end
def self.search(query, options)
docs = []
count = @@index.search_each(query, options) do |id, score|
doc = {}
doc[:id] = id
doc[:email] = @@index[id][''...
2005 Dec 09
1
Index returning ids that are one less than they should be
I''m saving records to an index like so:
index << {:id => id, :email => email, :contents => contents, :date => found_on}
In debugging my code, it appears that whatever I set a record''s id to,
when I find that record in a search, it returns the id minus 1, so if
the first record I store in my database has an id of one and I store
its counterpart in my index, then when I retrieve it from the index it
has an...
2005 Dec 02
1
cFerret ETA?
...e.dirname(__FILE__) + ''/../../searchindex''
# syncronization with ferret index
def after_save
@@index ||= Index::Index.new(:path => SEARCH_INDEX,
:create_if_missing => true)
@@index << {:id => id, :email => email, :contents => contents,
:date => found_on}
@@index.flush
@@index.optimize
end
def after_destroy
@@index ||= Index::Index.new(:path => SEARCH_INDEX,
:create_if_missing => true)
@@index.delete(id)
@@index.flush
@@index.optimize
end
...
end
I''m noticing about a 2-3 second delay after every new r...
2005 Dec 02
1
Compile error on FreeBSD 4.10 gcc 2.95.4
...;
> > # syncronization with ferret index
> > def after_save
> > @@index ||= Index::Index.new(:path => SEARCH_INDEX,
> > :create_if_missing => true)
> > @@index << {:id => id, :email => email, :contents => contents,
> > :date => found_on}
> > @@index.flush
> > @@index.optimize
> > end
> >
> > def after_destroy
> > @@index ||= Index::Index.new(:path => SEARCH_INDEX,
> > :create_if_missing => true)
> > @@index.delete(id)
> > @@index.flush
> >...