search for: aaf_index

Displaying 20 results from an estimated 26 matches for "aaf_index".

2007 May 30
4
aaf and dynamic attrs: a bug?
...ontact.acts_as_ferret :fields => [ :first_name ] assert Contact.find(:first).respond_to?(:first_name_to_ferret) assert_equal 1, Contact.find_by_contents(''Y*'').total_hits assert_equal 1, Contact.find_by_contents(''first_name:Y*'').total_hits Contact.aaf_index.close FileUtils.rm_rf ''index'' Contact.acts_as_ferret :fields => [ :first_name, :last_name ] assert Contact.find(:first).respond_to?(:last_name_to_ferret) assert_equal 1, Contact.find_by_contents(''Y*'').total_hits assert_equal 1, Contact.find_by...
2007 Oct 04
2
Offline indexing issues
If I disable ferret in my environment file and then run a cron job every hour to index the records that have been added/changed, do I enable Ferret just in the script that does the hourly indexing? Or do I somehow need to tell the process that runs the Ferret DRB server that it should start writing to the index again? Thanks in advance. Erik
2007 Jun 16
2
more specific queries via IndexReader
We would like to show a list of "most recently added terms", meaning, the results of this query: Resource.aaf_index.ferret_index.reader.terms(:summary) BUT, only returning terms from a certain set of documents (in our case, we are going to filter by creation data). Is this possible? Thanks, John
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 30
3
A way to get all the words from an index?
Hi, I am just wondering if there''s a way to get all the words from an index. Basically, all the words that have been indexed (excluding the stopwords if I''m using the stopwords analyzer, etc.) The fields I''m putting in are not :stored in the index. The idea is to implement a "did you mean?" mecanism, which is based on the content of the index, not on a
2007 Mar 19
7
Many index files
I''m using acts_as_ferret and have indexed a model with acts_as_ferret :fields => [:name, :ascii_name, :alt_names], :single_index => true. Now in the index directory more than 95.000 files are generated! The number of tuples I''m indexing is approx. 86.000. I can''t remember this from earlier ferret/acts_as_ferret versions where I''ve indexed millions of
2007 Apr 13
5
undefined method `ferret_index'' for xxx:Class
Hi I am trying to use ferret; the regular search works; but when I use the find_storage_by_contents to highlight the results, I am getting the above error. Please help thanks -- Posted via http://www.ruby-forum.com/.
2007 Mar 09
5
higlighting problem
Hi, I''ve been having a problem getting highlighting to work with aaf. I have a class defined as follows such: class Link < ActiveRecord::Base acts_as_ferret :fields => { :description => { :store => :yes } } end I get back the correct results when I do Link.find_by_contents, however, I''d like to highlight them. If I do something like iterate through the list of
2007 Sep 24
2
ferret fuzzy matches
Hi guys, Is there some way of getting ferret matches string, when i do a fuzzy search? The scenario is this: 1. The user search for ''show'' 2. Nothing was found 3. So I do a fuzzy search, passing ''show~'' 4. It gives me somes results, most of all was matched with ''showcase'' 5. So I want to tell the user that: Nothing was found with
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 Apr 03
5
Inifinite loop problem with DRb server
...ActsAsFerret module Remote class Server # vendor/plugins/acts_as_ferret/lib/ferret_server.rb:65 def method_missing(name, *args) clazz = args.shift.constantize begin @logger.debug "call index method: #{name} with #{args.inspect}" clazz.aaf_index.send name, *args rescue NoMethodError @logger.debug "no luck, trying to call class method instead" clazz.send name, *args end rescue @logger.error "ferret server error #{$!}\n#{$!.backtrace.join ''\n''}" r...
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 +
2007 Jul 03
4
problems with acts_as_ferret
...ams[:q] @total, @results = Post.find_storage_by_contents(@query, :page => (params[:page]||1)) @pages = pages_for(@total) end This is the code from post.rb: def self.find_storage_by_contents(query, options = {}) # Get the index that acts_as_ferret created for us index = self.aaf_index.ferret_index results = [] # search_each is the core search function from Ferret, which Acts_as_ferret hides total_hits = index.search_each(query, options) do |doc, score| result = {} # Store each field in a hash which we can reference in our views result[:title] = in...
2007 Jun 07
3
:store => :yes doesn''t work in some cases
I''m not really sure if this is a bug, but it makes my search results look a bit strange. I have an acts_as_ferret declaration that looks like: acts_as_ferret :store_class_name => true, :remote => true, :fields => { :ferret_name => { :store => :yes, :boost => 2 }, :ferret_content => { :store => :yes } } I store both fields so that I
2007 Sep 05
1
AAF and DRb with highlighting
...nge this method in order to get highlighting working with DRb? I''ve given up on searching on Google, I''m getting no results that are actually helpful. def self.find_storage_by_contents(query, options = {}) # Get the index that acts_as_ferret created for us index = self.aaf_index.ferret_index results = [] default_options = {:limit => 10, :page => 1} options = default_options.merge options options[:offset] = options[:limit] * (options[:page].to_i - 1) # search_each is the core search function from Ferret, which Acts_as_ferret hides total_hits...
2007 Jun 08
2
getting the list of indexed words from ferret or aaf
is the list of indexed words readily available via aaf or directly from ferret? -- Posted via http://www.ruby-forum.com/.
2007 May 10
0
Large index performance = 8x decrease
...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_configuration[:ferret_fields].keys.join('','')}") break if (!records...
2007 May 29
1
When does ferret / AAF decide to reindex?
I am experience situations where accessing the index results in a complete re-indexing of the model. I have not been able to detect a pattern. Under what circumstances does Ferret (or AAF) decide that it needs to rebuild the index? I''ll be happy to look at the code relevant to this if someone could direct me to it. Thanks, John
2007 Apr 30
1
Can''t search fields with space
Hi, I have a user model that has a city field which is searchable using acts_as_ferret. But I can''t get it to return any result whether I use :city => {:store => :no, :index => :untokenized}, or :city => {:store => :no} in my User model''s acts_as_ferret option >>> User.find_by_contents("city:(cal poly)") =>
2007 Feb 06
2
Which method to use to get content from index with a_a_f?
Hi everybody, After staring at the a_a_f API for quite sometime now, I decided it''s time to ask... Which method should I use to get content from the index without using highlight? Consider the following controller action: def preview if params[:search].blank? # normal case @text = @myfile. # which method do I use here to get the :text from the index??? else # if we come from