Displaying 20 results from an estimated 42 matches for "term_vector".
2007 Jun 12
5
index browser inconsistent with IndexReader
...showed the document with all its
fields intact, including the :data field. All the :data field terms
that failed to retrieve the document on the web app were indeed
present, according to the browser.
We then built a short script with the API that instantiated an
IndexReader and called IndexReader.term_vectors() with the id of our
subject doc. The term_vectors returned included a vector for
:keywords, but not for :data.
Somehow the core API funcs are not finding this document''s :data field
when the 0.11.4 browser is. Are there differences between the two
that would explain this? Does this p...
2007 Mar 31
3
Sorting issues, can anyone help me?
...:Base
acts_as_ferret :fields => { :title => {:boost => 2},
:description => {},
:url => {},
:rank_sort => {:index =>
:untokenized_omit_norms, :term_vector => :no},
:posted_at_sort => {:index =>
:untokenized_omit_norms, :term_vector => :no}
}, :remote => true
belongs_to :blog
def rank_sort
begin
return self.blog.rank_links.to_i
rescue
return nil...
2006 Sep 25
0
Odd indexing issue
...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, :index => :yes,
:term_vector => :with_positions_offsets, :boost => 1.0)
fie...
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
2007 Mar 28
4
retrieving search result positions
Hi
I''m considering using Ferret in v2 of Weft QDA, a wxruby desktop
application for textual analysis in social science.
Ferret seems a very impressive package that meets and exceeds my
requirements, but I can''t find how to retrieve specific details about
the results.
I''d like to be able to run fairly simple queries. I then need to look at
each term match, and get
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 field to
trigger this...
I''ve seen this problem on two different system...
2007 Feb 16
8
term vector blues
...::FieldInfos.new
fields.add_field :text, :store=>:no#, :index=>:omit_norms
i = Ferret::I.new :field_infos=>fields #:path=>''temp_index''
20.times{
i << {:text=>`man gcc`[0..135000]}
}
#i.close_writer
r=i.reader
#r.term_docs_for(:text, "example")
r.term_vector(0,:text)
example output:
$ ruby tvtest.rb
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
Reformatting gcc(1), please wait...
R...
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 try to add to the index as follows:
index <&...
2007 Mar 06
9
bug or "feature"?
...ture"?
another little problem i''ve found is that i''ve written this for the
search:
acts_as_ferret :fields => {:title => {},
:category_id => {},
:bought_at_int => {:index =>
:untokenized_omit_norms, :term_vector => :no},
:gift => {:index =>
:untokenized_omit_norms, :term_vector => :no}}
def self.full_text_search(query, category_id)
return nil if query.nil? or (query == '''')
query += " +category_id:{category_id}
+bought_at_int:>...
2006 Oct 16
3
seg faults and problems with new version
...y, let''s upgrade to 0.10.x and see how that goes. So I
updated to the latest gem of ferret, and switched 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 t...
2006 Sep 22
2
Searching untokenized fields
Hi ..
I tried to exclude certain objects from my search, by adding appropriate
term queries ..
i = Ferret::Index::Index.new
i.field_infos.add_field(:type, :index => :untokenized, :term_vector => :no)
i << {:type => "Movie", :name => "Indiana" }
i << {:type => "Movie", :name => "Forrest" }
i << {:type => "People", :name => "Forrest" }
now searching for forrest should give 2 results..
>...
2007 Apr 03
2
How can I count frequency of terms in a document?
Hi, there.
I need some help.
Is there a way to count frequencies of terms in a document on Ferret?
I know that Ferret has IndexReader#terms_docs_for method which counts
all documents.
I need to count frequencies of terms in a specific document.
Some way??
--
Posted via http://www.ruby-forum.com/.
2006 Jun 13
5
Grep style output?
Hi All,
Hope all is going well. Was just wondering if anyone has implemented a
grep style output page of hits using Ferret as the index/query engine?
Any thoughts about how best to implement it? The previous thread
discussess highlighting - would that be the best approach to follow or
is there a better way?
Cheers,
Marcus
--
Posted via http://www.ruby-forum.com/.
2007 Jul 25
17
DRb not starting
...:index => :untokenized},
:product_description=>{},
:product_label_description=>{},
:product_label_free=>{},
:product_product_id_supplier=>{},
:product_description_supplier=>{},
:supplier_description=>{},
:pub_date_sort => {:index => :untokenized_omit_norms, :term_vector =>
:no},
:location_id => {:index => :untokenized},
:tab => {:index => :untokenized}},:remote => false})
THis will do the ferret locally without the DRB server. Works ok.
If I change this to:
class Mutation < ActiveRecord::Base
acts_as_ferret ({:fields => {:descripti...
2006 May 26
8
Comparing two documents in the index
I want to compare two documents in the index (i.e. retrieve the cosine
similarity/score between two documents term-vector''s). Is this possible
using the standard Ferret functionality?
Thanks in advance,
Jeroen Bulters
--
Posted via http://www.ruby-forum.com/.
2006 Sep 26
4
Some documents not found
...PS: Here is some relevant code in case it helps. If you need more,
please ask, but this should be everything that matters. If necessary, I
can try to produce a simple test case the reproduces the 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 => ''...
2007 Mar 01
2
FerretHash
...File.unlink name
end
#open new ferret index with temp name
@name=name
open_writer
end
def open_writer
@writer and return
#a schema for the hash...
fis=Ferret::Index::FieldInfos.new
fis.add_field(:key, :index=>:untokenized, :store=>:no,
:term_vector=>:no)
fis.add_field(:value, :index=>:no, :store=>:yes, :term_vector=>:no)
@writer=Ferret::Index::IndexWriter.new(:path=>@name,
:field_infos=>fis, :create_if_needed=>true, :analyzer=>nil)
end
def close_writer
@writer.close
@writer=nil
end
d...
2007 Mar 09
5
memory leak in index build?
...re ''rubygems''
require ''ferret''
require ''set''
dir = "temp_index"
if ARGV.first=="-p"
ARGV.shift
prefix=ARGV.shift
end
fi= Ferret::Index::FieldInfos.new
fi.add_field :name,
:index => :yes, :store => :yes, :term_vector => :with_positions
%w[data field1 field2 field3].each{|fieldname|
fi.add_field fieldname.to_sym,
:index => :yes, :store => :no, :term_vector => :with_positions
}
i = Ferret::Index::IndexWriter.new(:path=>dir, :create=>true,
:field_infos=>fi)
list=Dir["/usr/s...
2007 Jun 08
13
Errror on update after Model.rebuild_index
Hi
I use Ferret 0.11.4 and the latest stabel version of the acts_as_ferret
plugin.
To the issue. if I do Model.rebuild_index and after that try to update
one of my objects of that Model I get:
File Not Found Error occured at <except.c>:117 in xpop_context
Error occured in fs_store.c:329 - fs_open_input
tried to open
2006 Oct 03
4
newbie question
...t;blah"'') do |id, score|
#just assert true if we didn''t get an error .. ferret
#seems to be working
assert true
end
end
end
which I think means that ferret is properly installed
When I search in my 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...