similar to: Confusing lock problem in rails

Displaying 20 results from an estimated 300 matches similar to: "Confusing lock problem in rails"

2005 Dec 02
1
cFerret ETA?
I''m noticing some long delays when optimizing my index. I know this is terribly inefficient, but in order to make sure that my ActiveRecord model is in sync with my index, I''m optimizing after every new record that I store, like so: class Resume < ActiveRecord::Base include Ferret has_and_belongs_to_many :users SEARCH_INDEX = File.dirname(__FILE__) +
2005 Dec 02
1
Compile error on FreeBSD 4.10 gcc 2.95.4
FYI, I tried installing ferret on my freebsd virtual server and got this: retango# gem install ferret --include-dependencies Attempting local installation of ''ferret'' Local gem file not found: ferret*.gem Attempting remote installation of ''ferret'' Updating Gem source index for: http://gems.rubyforge.org Building native extensions. This could take a while...
2006 Jan 05
2
ActiveRecord callbacks not happening
Hi, I have a model class like so: class Candidate < ActiveRecord::Base validates_presence_of :name @@index = FerretConfig::INDEX def self.after_destroy puts "Ferret: after_destroy called" @@index.query_delete("+id:#{self.id} +ferret_class:#{self.class.name}") optimize_index end end But when I delete a record, the after_destroy is never called.
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,
2007 Mar 12
5
index.rb:384 [BUG]
Hi folks, I''ve working and playing with acts_as_ferret and follow this fantastic tutorial: http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial When I try to implement the field storage tip, it crash. So, I try to make it via script/console: 1. I have a simple model called Articles: class Article < ActiveRecord::Base acts_as_ferret :fields =>
2006 Jul 25
6
Subtract a field from the current time in MySQL?
I have the following: Table Products: With a column called "purchased_at" of type "datetime". Products.find(:all, :conditions => ["? - purchased_at >= 120", Time.now]) Why doesn''t that work? What I''m trying to do is find records that were purchased less than or equal to 2 minutes ago. Thanks for your help. -- Posted via
2007 Oct 07
0
ferret performance before optimization
My problem is that I am adding on the order of hundreds of records, so not that many. The index is REALLY slow after I start adding records until I call optimize_index (I added a method for that - it''s a ferret function). Then it drops from >2 seconds to ~100ms per query. I figure the bulk_index functionality will help close the window of slowness, but not ideal and I don''t
2006 Jun 22
4
Filter on variable
Hi all, I have a question about filtering on a variable. If I have the following code in my controller to select a list of users > @allusers = User.find(:all, > :conditions => [''team_id = ?'', @params["id"], > :order => ''created_at'') Is there an easy way to find out all users who
2006 Oct 10
5
oddness when adding to index -
I was having some odd results when working with acts_as_ferret (current trunk), so I decided to test with the current version of ferret to see if I encountered the same problem. I did. Here are the details: installed ferret 0.10.10 on debian sarge with ''sudo gem install ferret'' (btw, same results on OSX) opened up an irb session: irb(main):001:0> require
2006 May 04
3
Date find help please.
Here''s my problem. I have an ''Item'' model with a date column called "inserted_on" formatted as "yyyy-mm-dd hh:mm:ss:t". I want to find all records that were inserted more than 30 days ago. How would I say that using the Item.find ( :all .....) method? I don''t fully understand the syntax. I tried @result = Item.find( :all, :conditions =>
2005 Dec 09
1
what exactly does close_dir option do?
I''m trying to figure out if I should be setting close_dir to true or false when I access my index. It seems like this has something to do with the state that the index is left in after one process is finished using it, but it''s not clear exactly what this does. Can anybody explain further? Thanks, Carl
2006 Feb 15
1
Per Database Migrations
Is there away to have parts of a migration file only work with a specific database. For example I am inserting some data into a table with: execute "INSERT INTO demo_lists(position, name, updated_at, created_at) VALUES (1, 1, ''scott'', CURDATE(), CURDATE());" Of course the curdate() function may only be available on mysql. So can we some how determine which
2007 Oct 03
2
Ferret and Mongrel and redirect_to
Hello, I try and run mongrel 1.0.1 and ferret 0.11.4 on Windows XP. To break mongrel all I have to do is invoke a class with Ferret in it. Here''s my class: require ''ferret'' include Ferret class SearchIndex def initialize print "SearchIndex:Initialize\n"; end end When I put this in my controller, I break mongrel: searchIndex =
2011 Jun 15
0
timeslider autodelete -vs.- my retention goals
Hi, I''m trying to do a simple data retention hack wherein I keep hourly, daily, weekly and monthly zfs auto snapshots. To save space, I want the dailies to go away when the weekly is taken. I want the weeklies to go away when the monthly is taken. From what I''ve gathered, it seems time slider just deletes the eldest snapshot when there''s space contention.
2008 Feb 19
2
searchindex
hi together is there a way to generate search indexes like cyrus in dovecot ? thanks -- Wie nennt man es, wenn eine Kuh Ski f?hrt? MU-SCHI !!! * Dies ist ein Zufallstext und hat nichts mir dem Empf?nger der Mail zu tun
2005 Apr 21
4
[LLVMdev] Trailing whitespace removal (important for CVS users!)
On Thu, 21 Apr 2005, Reid Spencer wrote: > Why not put all this into a pre-commit filter in CVS and be done with > it? We'd never be bothered with it again as it would never be committed > again. I'd rather not have CVS commit scripts mucking with the code. If you want to have the nightly tester whine about source code with spaces at the end of lines (like it whines about
2002 Jun 17
1
overzealous help-links.sh script! (PR#1682)
Starting html help in the current version of R has a very annoying side-effect. It indiscriminantly removes $HOME/.R, and replaces it with a virgin copy. I discovered that when all of a sudden I got complaints about my startup "library" not being found. Below is a modified version of the script that doesn't do this. It is not perfect yet (it shouldn't try to recreate links
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 Nov 04
0
Model.delete_all vs Model.destroy_all in a habtm
Hi there I have an habtm association between 2 Models. I regularly have to truncate the table on one side of the relationship and repopulate the table with a fresh csv file. I notice that f I do Model.delete_all, none of the records in my habtm join table get deleted, whereas if I use destroy_all they do. However, the overhead of using destroy_all is too great. For the amount of records I have
2012 Feb 06
2
Possible broken indexer(lucene/solr)?
Hello, try to use the new 2.1rc and don't get any data in the searchindex. Tried first lucene, and switched than back so solr. If I do an search in an mailfolder, i get in the dovecot-log 2012-02-06 22:17:11 | dovecot: | indexer-worker(xxxxxx): Indexed 0 messages in INBOX/dovecot Log from solr. Feb 6, 2012 10:17:11 PM org.apache.solr.core.SolrCore execute INFO: []