search for: create_index

Displaying 11 results from an estimated 11 matches for "create_index".

2007 Jan 01
2
Possible Bug when Creating Indexes
...te 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 try to add to the index as follows: index << {:id => 1, :subject => "test subject", :author => "test author", :tags => "tags, like, this"} I get the following error: build_ferret_index.rb:39:in `<<'': wrong argu...
2007 Feb 26
4
Ferret 0.11.0 tests segfault
I have an important segfault when I create the index (via Ferret::Index::FieldInfos#create_index). I decided to run the tests, this is what I have : $> ruby test_all.rb Loading once Loaded suite test_all Started ....................EEEEEEEE./unit/../unit/index/../../unit/store/../../unit/analysis/../../unit/utils/../../unit/query_parser/../../unit/search/tc_filter.rb:11: [BUG] Segmentation...
2007 Mar 02
4
Sorted empty search bug
Hello Dave, Hello all, I''ve got this error because I try to search something and sort it by name : Argument Error occured at <except.c>:93 in xraise Error occured in sort.c:551 - field_cache_get_index Cannot sort by field "name". It doesn''t exist in the index. The problem, occur when my index is empty, so the field "name" does not exists. --
2011 Nov 28
29
Lack of foreign-key constraints support in ActiveRecord
Is there any reason why AR has never supported foreign-key constraints? I can understand the lack of support for triggers and stored procedures since they are highly dependent on the database to create a wrap API around them. But this is not the case for foreign keys. This is specially important for open-source projects like Redmine/Chiliproject and Gitorious where you shouldn''t be
2006 Sep 05
4
No matches
...nks. -----------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"} index << {:name => "Sandy"} index << {:name => "Billy"} index << {:name =&...
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 Sep 23
0
TermQuery problem
...it 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>
2006 Sep 25
0
Odd indexing issue
...r => :with_positions_offsets, :boost => 1.0) field_infos.add_field(:tags, :store => :no, :index => :yes, :term_vector => :with_positions_offsets, :boost => 5.0) field_infos.add_field(:id, :store => :yes, :index => :untokenized, :term_vector => :no) field_infos.create_index(FerretConfig::INDEXPATH) index = Ferret::Index::Index.new(FerretConfig::INDEXOPTIONS) batch_size = 1000 Entry.transaction do 0.step(Entry.count, batch_size) do |i| Entry.find(:all, :limit => batch_size, :offset => i).each do |rec| index << rec.make_entry_ferret_doc end...
2006 Jul 07
4
Help installing Ferret
http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails I followed everything here but at the last I get when loading page get_results Can only handle a String or a Query. RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/models/result.rb:27:in `search_each'' #{RAILS_ROOT}/app/models/result.rb:27:in `search_index''
2006 Mar 09
1
Missing fields in search result
...9;', :analyzer => Analysis::WhiteSpaceAnalyzer.new) SR = Index::IndexSearcher(:path => ''/home/gregor/wisa/index'', :analyzer => Analysis::WhiteSpaceAnalyzer.new) Storing: # initial creation of a lucene index def create_index # our central INDEX index = FerretConfig::INDEX # get all Companies, iterate over and index them companies = Company.find(:all) for company in companies doc = Document.new doc << Field.new("id", company.id, Field::Store::YES, Field::Inde...
2006 Sep 26
4
Some documents not found
...problem... ### --- bulk indexer --- # create an empty index... fi = Ferret::Index::FieldInfos.new(:term_vector => :no) fi.add_field(:id, :index => :untokenized, :term_vector => :no, :store => :yes) fi.add_field(:content, :index => :yes, :term_vector => :no, :store => :no) fi.create_index("search-index-new") # open it... index = Ferret::Index::Index.new(:path => ''search-index-new'', :analyzer => Ferret::Analysis::AsciiStandardAnalyzer.new ) # get the products... start = Time.new puts ''loading product data'' offset = 0 batch_size...