search for: field_infos

Displaying 20 results from an estimated 39 matches for "field_infos".

2007 Jan 01
2
Possible Bug when Creating Indexes
I''m running: ferret (0.10.9) ruby 1.8.5 (2006-08-25) [i386-mswin32] on Windows XP(SP2) When I create an index as follows: field_infos = FieldInfos.new(:store => :yes, :term_vector => :no, :index => :yes) field_infos.add_field(:id, :index => :untokenized) field_infos.add_field(:subject) field_infos.add_field(:author) field_infos.add_field(:tags, :store => :no) index = field_infos.create_index(THREAD_INDEX_DIR) then...
2006 Nov 23
0
Two repeatable crash bugs in Ferret proper
...t really geared up for that environment. I figure someone here is better equipped to handle this. Schnitz --- First bug: quotes in search terms #!/usr/bin/ruby require ''rubygems'' require ''ferret'' # Strangely, the omit_norms is required to exercise the bug. field_infos = Ferret::Index::FieldInfos.new(:index => :omit_norms) field_infos.add_field( :phile_id ) field_infos.add_field( :file_name ) index = Ferret::Index::Index.new( :field_infos => field_infos, :path =>''./exercisequotebugindex'', :create => true )...
2007 Apr 10
8
ferret-0.11.4-mswin32 not compatible with Ruby1.8.4
Just a quick note for future reference - at least for me, ferret won''t work on Ruby 1.8.4. gem install ferret Successfully installed ferret-0.11.4-mswin32 ruby -v ruby 1.8.4 (2005-12-24) [i386-mswin32] irb irb(main):001:0> require ''ferret'' A windows error message box appears - ruby.exe - Entry Point Not Found The procedure entry point rb_w32_write could not be
2006 Sep 05
4
No matches
The following script creates a search index and then searches it. I get no results? Where am I going wrong? Thanks. -----------BEGIN SCRIPT---------------- require ''rubygems'' require ''ferret'' include Ferret path = ''/tmp/myindex'' field_infos = Ferret::Index::FieldInfos.new() field_infos.add_field(:name, :store => :yes, :index => :yes) field_infos.create_index(path) index = Index::Index.new(:path => path, :field_infos => field_infos, :analyzer => Analysis::AsciiStandardAnalyzer.new) index << {:name => "Joe...
2007 Apr 09
5
IndexReader#terms for all fields?
Is it possible to query the index for a TermEnum for all fields in the index instead of just ? Thanks, John
2006 Sep 25
0
Odd indexing issue
...E "542 \2102\032" "2294 0\3075\010" "4186 \250* \010" OUTPUT FROM THE ABOVE 2nd TIME "1762 \260\020\036\010" "2617 \000\000\000\000" "2719 0`+\010" "3176 p`0\010" ---------------from entry.rb def self.create_ferret_index() field_infos = Ferret::Index::FieldInfos.new(:store => :no, :index => :yes, :term_vector => :no, :boost => 1.0) field_infos.add_field(:name, :store => :no, :index => :yes, :term_vector => :with_positions_offsets, :boost => 10.0) field_infos.add_field(:address, :store => :no, :i...
2006 Sep 18
16
Dynamic fields and AAF
Hi, I have a model which has properties, these are your standard name/value pairs, but also have attributes that affect how I want to store them in ferret. I was using 0.9.5 with 0.2 of aaf, which seemed fine, I just copied and pasted (yes, I know, ick) the to_doc method and added code to iterate though the properties that that model had, and add relavent fields to the document. It seems
2006 Apr 19
2
Ferret EOFError creating index
...each'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/ferret/index/segment_merger.rb:338:in `merge_norms'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/ferret/index/segment_merger.rb:334:in `each_with_index'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/ferret/index/field_infos.rb:130:in `each_with_index'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/ferret/index/field_infos.rb:130:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/ferret/index/field_infos.rb:130:in `each_with_index'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/fe...
2006 Oct 03
4
newbie question
...y app I get this error undefined method `exists?'' for {:term_vector=>:no, :store=>:no, :boost=>1.0, :index=>:yes}:Hash RAILS_ROOT: /Users/chrisc/Documents/checkouts/PROS/config/.. Application Trace | Framework Trace | Full Trace /opt/local/lib/ruby/site_ruby/1.8/ferret/index/field_infos.rb:20:in `initialize'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:166:in `rebuild_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:230:in `create_index_instance'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.r...
2006 Oct 03
4
newbie question
...y app I get this error undefined method `exists?'' for {:term_vector=>:no, :store=>:no, :boost=>1.0, :index=>:yes}:Hash RAILS_ROOT: /Users/chrisc/Documents/checkouts/PROS/config/.. Application Trace | Framework Trace | Full Trace /opt/local/lib/ruby/site_ruby/1.8/ferret/index/field_infos.rb:20:in `initialize'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:166:in `rebuild_index'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:230:in `create_index_instance'' #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.r...
2006 Oct 16
3
seg faults and problems with new version
...d over to the stable tagged branch of acts_as_ferret, but now I get the following: >> Person.rebuild_index NoMethodError: undefined method `exists?'' for {:index=>:yes, :term_vector=>:no, :store=>:no, :boost=>1.0}:Hash from /usr/lib/ruby/site_ruby/1.8/ferret/index/field_infos.rb:20:in `initialize'' from ./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:166:in `rebuild_index'' from (irb):1 Any thoughts? I don''t want to start going into the code and messing with stuff in the acts_as_ferret plugin,...
2006 Sep 23
0
TermQuery problem
...Query.new(:message_id, x)) => #<struct Ferret::Search::TopDocs total_hits=1, hits=[#<struct Ferret::Search::Hit doc=123, score=7.21260595321655>], max_score=7.21260595321655> So how come the first search doesn''t return anything? FWIW, I am creating the index like this: field_infos = Ferret::Index::FieldInfos.new :store => :yes field_infos.add_field :message_id # ... field_infos.create_index dir @i = Ferret::Index::Index.new(:path => dir) Thanks for any help! -- William <wmorgan-ferret at masanjin.net>
2007 Feb 27
3
segfault in ferret 0.11.0
...s: Loaded suite ferret_updater_unit_test Started E/usr/local/lib/ruby/1.8/erb.rb:504: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i686-darwin8.7.1] Abort trap When I revert back to 10.14 I dont get this error. When I comment out the line: Ferret::Index::Index.new({:path => @index_path, :field_infos => fi, :create_if_missing => true, :analyzer => StemmedAnalyzer.new}) This error goes away... If there''s any other things you need to know, let me know and I will be more than glad to answer any questions. Cheers, -Ray -- Posted via http://www.ruby-forum.com/.
2007 Jun 12
5
index browser inconsistent with IndexReader
Hi, We have an index of around 1M web pages as part of our web app. The app uses ferret by way of RDig to perform searches. We have noticed anecdotally that some searches don''t work the way we thought they should, as if documents were missing from the index. Yesterday we came upon a concrete instance of this. Our documents have several fields, one of which is called :keywords and
2006 Nov 22
2
crash while retrieving term vectors
This program reliably crashes for me (usually a segfault): require ''rubygems'' require ''ferret'' reader=Ferret::Index::IndexReader.new ARGV fields=reader.field_infos.fields reader.max_doc.times{|n| fields.each{|field| reader.term_vector(n,field) } unless reader.deleted?(n) print "."; STDOUT.flush } As you can see, it just goes through the index, retrieving all the term vectors. I imagine term vectors must be enabled in at least one fie...
2007 Jul 11
4
Query scoring - WTF?
Hi! I thought I understood Ferret''s query scoring and how to tweak results using boost values. What I currently experience however, leaves me completely baffled. Perhaps someone can shed some light on the scoring algorithm, because asking Ferret to "explain" the score for a particular document isn''t as informative as I thought. Actually, it confuses me even
2006 Oct 07
5
How to proceed with incorporating Ferret?
Hi, I''ve listened in to this mail list for quite a while now but not doing anything with Ferret until I was ready to incorporate it. I''ve used Lucene for years, but not Ferret. I downloaded and installed the ''bleeding edge'' version (lets call it 0.10.9.1). There appears to be a significant re-working of the API happening. It all looks good. But there
2007 Sep 14
0
How to call optimize
...models = models.flatten.uniq.map(&:constantize) logger.debug "rebuild index: #{models.inspect}" index = Ferret::Index::Index.new(aaf_configuration[:ferret].dup.update(:auto_flush => false, :field_infos => ActsAsFerret::field_infos(models), :create => true)) index.batch_size = aaf_configuration[:reindex_batch_size] index.logger = logger index.index_models models end -- Posted via http://www.ru...
2007 Aug 03
2
can''t search for OR (as in the state)
I''m trying to search a Model by the state field using Acts As Ferret. The query for this is ''+state:NY'' (substitute state abbreviation for NY). This works find however ''+state:OR'' returns nothing, though just ''portland'' will pull up matches within that state. I''m pretty sure it''s reading OR as an or conditional
2007 May 10
0
Large index performance = 8x decrease
...e # think of body/title 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('','')}&quo...