similar to: ActiveRecord callbacks not happening

Displaying 20 results from an estimated 400 matches similar to: "ActiveRecord callbacks not happening"

2005 Dec 08
2
Confusing lock problem in rails
I have a model class in rails that has a class variable that is a ferret index. For some reason, the methods in my class that refer to the class variable are getting lock conflicts. Can anybody see any obvious reason why? I notice that it keeps leaving a lock file in the index directory. I thought auto_flush was supposed to remove the lock automatically after every operation. Is there
2006 Jul 09
3
acts_as_ferret.. what does it actually do?
Okay in this plea for help I''m going to repeat some of what i posted before but with a larger amount of background info in the hope that i can get a decent grip on ferret before it wriggles away.. Firstly, what does installing the acts_as_ferret plugin actually do? I install it and add it to my model and then the index is automatically generated and a few methods are added to it and
2006 Jun 27
2
Using QueryParser vs building my own query
Hello all I finally caved in and decided I should build my own query instead of relying on QueryParser to do the job for me, but I''ve hit a strange problem.. Here''s how I build my query: #Main query query = Ferret::Search::BooleanQuery.new #Build query to match types typesquery = Ferret::Search::BooleanQuery.new @selected_types.each{|type| typesquery.add_query(
2005 Dec 02
43
ANN: acts_as_ferret
Hi all This week I have worked with Rails and Ferret to test Ferrets (and Lucenes) capabilities. I decided to make a mixin for ActiveRecord as it seemed the simplest possible solution and I ended up making this into a plugin. For more info on Ferret see: http://ferret.davebalmain.com/trac/ The plugin is functional but could easily be refined. Anyway I want to share it with you. Regard it as a
2005 Dec 02
43
ANN: acts_as_ferret
Hi all This week I have worked with Rails and Ferret to test Ferrets (and Lucenes) capabilities. I decided to make a mixin for ActiveRecord as it seemed the simplest possible solution and I ended up making this into a plugin. For more info on Ferret see: http://ferret.davebalmain.com/trac/ The plugin is functional but could easily be refined. Anyway I want to share it with you. Regard it as a
2006 May 31
5
Help with sorting arrays with objects in it
I have to build an array through both activerecord and also through a ferret index. I was hoping to find a way of sorting the array as i combine the two so def advanced_search(search_text, store, format, sortby) # find items in ferret index items = Item.find_by_contents(search_text) # and now find all the items from a certain store or category items_from_sql = Item.find_by_sql("SELECT *
2005 Nov 26
3
Several questions about Ferret.
Hi. First of all I would like to say "thank you" to David for its really valuable work. Ferret is a great project and it have great future. Well now is my questions as beginner in Ferret. How to remove ALL documents from index. Remove files is not a solution. I am interesting in something like index.remove_index or something like this. What is a usual way of doing it?? What is the
2006 Jul 14
3
Whitespace Issues
I am trying to build up a filtered search using the logic below. bq = Ferret::Search::BooleanQuery.new bq.add_query(Ferret::Search::TermQuery.new(Ferret::Index::Term.new("section",section.downcase!)), Ferret::Search::BooleanClause::Occur::MUST) filter = Ferret::Search::QueryFilter.new(bq) @vobjects = VoObject.find_by_contents(search_input,:filter => filter, :sort
2006 Jan 02
3
Multiple indexes?
Hi, I''m indexing records from different database tables and they have identical column names in many cases. Does this mean I have to create different indexes for each table? TIA, Vamsee.
2007 May 14
3
How to make a Tag cloud with Ferret ?
Hello, I want to make a TAG CLOUD using ferret. How can i do so ? I would need to know the amount of keyword for every each words in the index. Thank you -- Posted via http://www.ruby-forum.com/.
2006 Sep 22
1
Query Objects vs. Query Strings
Hi .. I tried to build some query objects to get some documents from my index.. without success.. Is something wrong here? q = Ferret::Search::BooleanQuery.new q1 = Ferret::Search::TermQuery.new(:type, "movie") q2 = Ferret::Search::TermQuery.new(:name, "Indiana") q.add_query(q1, :should) q.add_query(q2, :should) Indexer.index.search_each(q) do |doc, score| puts doc end 0
2006 Aug 28
1
How should this be done with ferret 0.10.1
Hi i like the new version of ferret, has solved a few of my problems but i''m unsure of how to implement the following code in the new version of ferret? if section if !section.empty? qp = Ferret::QueryParser.new("section") query = qp.parse("\"#{section}\"") bq.add_query(query, Ferret::Search::BooleanClause::Occur::MUST) filter_on =true end
2006 Aug 15
5
Ferret Segmentation Faults
Hi, I am getting a number of segmentation faults using Ferret 0.9.5, Fedora Core 5 and Ruby 1.8.4 I installed it with the recommended gem install ferret and example segmentation fault creation line would be as follows: @records = FerretConfig::INDEX.search("address_line_2:\"Dumbarton\"") I am also using acts_as_ferret and rails 1.15 but think this is an issue with
2005 Dec 31
2
Some newbie questions
Hi all, I''m newly discovering Ferret, and just did a crash course on Lucene to (I get the concepts behind it). But I''m have a few doubts: 1. What is the ''recommended'' way of integrating Ferret into my app now? The gem version or the plugin? 2. Where do I checkout the plugin from? Do I just copy the version on the wiki? Those apart, Ferret is really
2006 Jun 11
3
Bus Error with Ferret 0.9.3 using the BooleanQuery api
Hey guys, I''ve been trying out ferret 0.9.3 on my powerbook this weekend and I''ve been triggering ''bus errors'' when using the Query API. If I programmatically build up strings, it works just fine. There''s some more information available in the trac ticket http://ferret.davebalmain.com/trac/ticket/62 Is anyone successfully using the Query API on
2005 Dec 18
1
assert_template fails?
Hi All, I have a seemingly simple problem - but can''t figure out the problem. I have a simple functional test like so: def test_should_show_search_dropdown get :index assert_response :success assert_template :search end Inspite of having search.rhtml in /app/views/layout, it fails with an error: 1) Error: test_should_show_search_dropdown(SearchControllerTest):
2006 Mar 13
6
:dependent => :destroy
Hi, There is something I don''t understand about :dependent => :destroy. I hope someone can help me. Consider this code: class Folder < ActiveRecord::Base has_many :myfiles has_many :folders has_many :group_folders, :dependent => :destroy validates_uniqueness_of :name, :scope => "folder_id" validates_presence_of :name before_destroy
2006 Mar 29
1
Problems with Ferret 0.9.0
Hi, I upgraded from 0.3.2 to 0.9.0, and now my old search code doesn''t work anymore. I get a lot of ArgumentErrors, for example: "query.add_clause(Search::BooleanClause.new(query_parser.parse(term), Search::BooleanClause::Occur::MUST))" raises: ArgumentError (wrong number of arguments (2 for 0)) "index_searcher.search_each(query)" raises: ArgumentError
2006 Jan 05
6
Problems with Ferret in RForum
Hi, I have been using Ferret on ruby-forum.com for a few days. While the searching works with reasonable performance, there are a lot of problems related to indexing. Sometimes the process hangs with 100% CPU usage, sometimes it leaves Lockfiles in the directory (causing other processes to fail while one ist still working), sometimes it even crashes with a segfault. I''m going to
2012 Dec 06
2
Bye Bye, Observers
Observers will be no more as of Rails 4, farewell, never been much of a fan. However, I''m using it in one of my gems which enables model attributes for use with a WYSIWYM editor. The resulting markup is persisted, but in order to use it in a view, it has to be nokogiried in a helper which fragment caches the result. This cache has to be zapped once the model instance is either