search for: or_default

Displaying 10 results from an estimated 10 matches for "or_default".

2008 Jan 02
4
utility of default_field
The documentation* states that when using a single index for multiple models, the default_field list should be set to the same thing for all models. However, in my application, all my models have very different fields and this is not possible. I still want the results returned sorted by term frequency across all indexed content in each model. What is the purpose of default_field? Under
2007 Jul 31
5
Group by clause
Hi Does acts_as_ferret support a :group clause? For e.g any rails options like :select or :group etc? or is it that it supports only few of such options?Like it supports :include Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ferret-talk/attachments/20070731/a74fb666/attachment.html
2007 Mar 12
5
index.rb:384 [BUG]
...=nil, @searcher=nil, @options={:lock_retry_time=>2, :path=>"script/../config/../config/../index/development/article", :create_if_missing=>true, :default_field=>["title"], :analyzer=>#<Ferret::Analysis::StandardAnalyzer:0x2b686dc75f78>, :auto_flush=>true, :or_default=>false, :dir=>#<Ferret::Store::FSDirectory:0x2b686dc76748>, :key=>:id, :handle_parse_errors=>true}, @mon_waiting_queue=[]> (it''s ok, seems to run ok! :) >> query = "ruby" => "ruby" >> options ="" (mmmh, just enough! Now.....
2006 Oct 24
2
Problem with stop words
I am seeing trouble with searches for ''you'' not returning anything. It appears that ''you'' is a stop word to the standard analyzer: require ''rubygems'' require ''ferret'' index = Ferret::I.new(:or_default => false) index << ''you'' puts index.search(''you'') returns no hits. I assumed from the docs that StandardAnalyzer was using stop words as defined by: Ferret::Analysis::ENGLISH_STOP_WORDS but when I print that to the console I get: ["a&...
2006 Oct 17
2
Problems with stop word analysis and queries
I have a problem, and I think it''s because stop word analysis isn''t happenning in the queries. I think it''s the way ferret is doing things that''s causing this bug. Let''s say I''m searching across documents with a title. And I have a document with a title of "Bash Guide for Beginners". If a user types in the query: Bash Guide
2006 Oct 15
12
Very small scores for search results
...results rarely makes much sense. I sometimes get restaurants in the search results! I haven''t used any boost or anything on the name field. My Business class calls AaF like this: class Business < ActiveRecord::Base acts_as_ferret( :fields => { :name => { } }, :or_default => true ) ... end Does anyone have any ideas as to what might be causeing this? Any help would be greatly appreciated. Thanks, Pete. -- Posted via http://www.ruby-forum.com/.
2006 Sep 09
2
search_each segmentation fault and parser anomoly
...ntent => ''four'', :file => ''f4.txt''} index << {:content => ''five'', :file => ''f5.txt''} index.optimize index.close query_parser = QueryParser.new({:default_field => :content, :or_default => false, }) query = query_parser.parse(ARGV.join('' '')) puts "query: #{query}" searcher = Search::Searcher.new(path) searcher.search_each(query) do |doc, score| puts "file: #{searcher[doc][:file]}" end -------------END SCRI...
2007 Nov 13
8
acts_as_ferret : cannot use a customized Analyzer (as indicated in the AdvancedUsageNotes)
Hi all, I cannot make aaf (rev. 220) use my custom analyzer, despite following the indications @ http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage To pinpoint the problem, I created a model + a simple analyzer with 2 stop words : "fax" and "gsm". test 1 : model.rebuild_index + model.find_by_contents("fax") # fax is a stop word. => I get a
2006 Oct 09
2
hello, acts_as_ferret questions, any help greatly appreciate
hi, ive been reading up on ferret, acts_as_ferret, and other search plugins for rails. after reading about ferret, i found out about the acts_as_ferrt plugin. my first question about acts_as_ferret: 1. from reading about ferret, do i still need to manually save the IDX and add a IDX column field to my model table for acts_as_ferret to work? they say that acts_as_ferret handles everything,
2007 Jul 07
2
Extending/Modifying QueryParser
...go about achieving this functionality? Here''s an overview of what I''ve done so far: My model classes in my rails app use acts_as_ferret with a call that looks like: acts_as_ferret( :fields => [:body], :store_class_name => true, :ferret => { :or_default => false, :analyzer => SynonymAnalyzer.new(WordnetSynonymEngine.new, []) } ) I created a SynonymAnalyzer and SynonymTokenFilter: class SynonymAnalyzer < Ferret::Analysis::Analyzer include Ferret::Analysis def initialize(synonym_engine, stop_words = FULL_ENGLISH_ST...