Displaying 20 results from an estimated 1000 matches similar to: "multibyte character corrupt in highlight method"
2007 Jan 29
1
Segmentation fault in Search::Searcher#highlight
I''m using ferret 0.10.14 in Linux Fedora 3.
When I do highlight with Index::Index#highlight, it works well.
But, doing the same test with Searcher#highlight,
[BUG] Segmentation fault occurred.
Here''s my test code.
require ''rubygems''
require ''ferret''
include Ferret::Search
#searcher = Ferret::Index::Index.new(:path =>
2008 Mar 05
0
Index Searcher Causes GC Memory Error: "irb: double free or corruption"
My linux Ruby application is using Ferret 0.11.4. I created my own class IndexSearcher to contain
the Searcher of multiple directories. If I do not have the searcher.close called, the end of
runner/console or runner/server will pop out with system error:
*** glibc detected *** irb: double free or corruption (fasttop): 0x0a51d6c0 ***
======= Backtrace: =========
/lib/libc.so.6[0x638ac1]
2007 May 02
1
MultiSearcher Results Question
If searching multiple indexes with a single searcher is there anyway to
identify which index a resulting doc is stored in?
i1 = Ferret::I.new
i2 = Ferret::I.new
i1 << {:id=>1,:text=>"random stuff"}
i1.commit
reader =
Ferret::Index::IndexReader.new([i1.options[:dir],i2.options[:dir]])
searcher = Ferret::Index::IndexSearcher.new(reader)
query =
2006 Sep 03
9
using highlight from aaf
Hi,
I''m trying to use highlight ferret method with trunk aaf and 0.10.1
ferret.
In my search display I use:
Myindexedclass.ferret_index.searcher.highlight(@query, result_line.id,
:content)
* searcher is a protected method; how can I access to the searcher from
aaf ?
* is the doc id in aaf the same as my model id ?
* is the first param, query, the string query or the query object ?
2007 Jul 07
2
Extending/Modifying QueryParser
Hi,
I''ve implemented synonym searching in my rails application but have
an idea I''d like to implement but can''t figure out how to do. The
idea is that I''d like to give the end user the choice on whether to
search for the synonym of a word or not. Preferably by extending the
query language to parse a construct similar to ''%word1'' and
2007 Sep 05
1
AAF and DRb with highlighting
How would I change 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,
2007 Jun 19
3
another issue with highlighting
Hi,
I''m encountering another highlighting issue.
(about the first one "range search and highlighting", i received no
response. I don''t even know if somebody tried to reproduce and/or if
it''s normal behavior)
about the new issue, an example will be easier for you to reproduce:
I''m filling an index with random data, i try to match for "*1*"
2006 Sep 26
3
concurrency / #search_each problem / segfault
Hello everyone,
I was stress-testing my application (running on Rails via FastCGI) by
letting two concurrent users (not human .. an app called ''siege'')
a) save an Article and b) search for all Articles.
I am searching via
Article.ferret_index.search_each( ..) do |doc_id,score|
doc = index[doc_id]
..
end
and writing via
Article.ferret_index <<
2006 Sep 09
2
search_each segmentation fault and parser anomoly
The included test script turned up the following anomolies (run
against Ferret 0.10.3, but had same problems with 0.10.2):
1. When the content word is not in the index the inclusion of a
wildcard file term causes search_each to throw a segmentation
fault.
$ ./test.rb zzz file:*.txt
query: +content:zzz +file:*.txt
./test.rb:28: [BUG] Segmentation fault
ruby 1.8.4 (2005-12-24)
2008 May 09
1
Searcher Explain
Hi,
I am unable to use the Searcher''s explain method. Anytime I call it, I get
Segmentation Faults and it kills the process I have running my Rails site.
Has anyone else had this problem? Here is some code I am trying to use it
in...
search = Search.create(:query => query)
@quotations = []
searcher = Ferret::Search::Searcher.new("index") # FerretConfig::INDEX
bq =
2006 Oct 31
3
No search results using Searcher
I just started using Ferret and I successfully indexed some documents. I
can search this index using the following code:
index = Index::Index.new(:path => path)
index.search_each("something") do |doc, score|
print "##{doc} #{index[doc][''url'']} - #{score}"
print "\n"
end
However, when I try to use Search::Searcher and QueryParser
2007 Mar 07
0
A note about #search vs #search_each
Hi,
I just "solved" an issue which I mentioned on this list many moons ago,
regarding searches somehow being serialized, such that a long search
would cause others to wait noticeably.
Anyhow, after coding both :limit and applying homegrown thread time
limit monitoring, I discovered that Searcher#search_each uses
rb_thread_critical = Qtrue whereas Searcher#search doesn''t.
I
2007 Feb 01
2
Searcher do not work or I do not work
Hi.
I want to learn more about ferret. So I downloaded ferret-0.10.14 and
write a simple test script
Only query = TermQuery.new(:content, ''program'') gives result.
If I change ''program'' with ''Good'' or ''Extra'' -> no result
and searching on (:title, ''Ruby'') -> no result
Strange, Strange
Here is the
2007 Jun 17
1
highlighting and range queries
Hi there,
Is highlighting for range queries supposed to work ?
It doesn''t work here.
here is an non-working example: (highlighting works when q="test:2007*")
require ''ferret''
include Ferret
index = Index::Index.new()
#index.field_infos.add_field(:test, :store => :yes, :index => :untokenized)
i=1
for a in [ "20070505", "20071230",
2007 Jan 05
3
Confused about Search Results
Hi everyone,
I''m pretty new to Lucene and Ferret, so I feel that this is most likely
myself not completely understanding the correct way to do this. I haved
indexed ~2200 text files (of various sizes), and I am now running
searches on the index to get a feel for Lucene and Ferret.
In my first program, which is using Lucene I search for ''influenza'' and
get the
2006 Oct 10
4
Need help for coding an extension to ferret
Hi,
i''m working on a project using Ferret for indexing it''s datas. I''m very
happy with it but i need to code an extension to implement a .to_json
method to TopDocs class, because ruby''s json implementation is really
really slow...
It''s my second (the first was the tutorial :/ ) ruby C extension, so i''m
not really at ease with ruby C
2006 Dec 01
1
Effective search when knowing ID
Hi list,
I''m new to ferret and I wonder what is the best way to search if I
know one fields id and want to search on its content.
I have experimented with FilteredQuery but I don''t know if this is
the best way.
Eg.
index = Index::Index.new(:path => ''/tmp/all'')
@dbh = Database.instance.connect
result = @dbh.exec("SELECT pk_fulltext_id, fulltext_text
2007 Feb 16
1
Highlight raises Segmentation Fault Error in Ferret 0.10.9 i
Hi Everyone,
I am currently in process of upgrading Ferret 0..9.1 to Ferret 0.10.9
with Ruby 1.8.4 in windows platform. I am trying to use search highlight
feature on index_searcher
subject = index_searcher.highlight("subject:(blah blah)", 0,
:field => :content,
:pre_tag = "<span
2007 Apr 09
5
highlight crashes
I am trying to use highlight, but I am getting this kind of thing:
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:197:in
`highlight'': IO Error occured at <except.c>:93 in xraise (IOError)
Error occured in index.c:1222 - lazy_df_get_bytes
len = -5, but should be greater than 0
from
2007 Mar 12
5
index.rb:384 [BUG]
Hi folks,
I''ve working and playing with acts_as_ferret and follow this fantastic
tutorial:
http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial
When I try to implement the field storage tip, it crash. So, I try to
make it via script/console:
1. I have a simple model called Articles:
class Article < ActiveRecord::Base
acts_as_ferret :fields =>