amit
2007-Feb-16 02:07 UTC
[Ferret-talk] 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
class=''highlight''>",
:post_tag = "</span>")
But all my tests fails and I run into Segmentation Fault Error.
Does anyone has come across this bug? I see couple of emails in this
forum but
I have not been able to find solutions. Can some one please help me and
tell me what is the correct implementation ?
-Amit
--
Posted via http://www.ruby-forum.com/.
David Balmain
2007-Feb-16 03:08 UTC
[Ferret-talk] Highlight raises Segmentation Fault Error in Ferret 0.10.9 i
On 2/16/07, amit <rohatgi83 at google.com> wrote:> 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 class=''highlight''>", > > :post_tag = "</span>") > > But all my tests fails and I run into Segmentation Fault Error. > Does anyone has come across this bug? I see couple of emails in this > forum but > I have not been able to find solutions. Can some one please help me and > tell me what is the correct implementation ? > > -AmitIt looks like you are using IndexSearcher#highlight. The first argument must be a Query object rather than a String. If you want to use a String then you should use Index#highlight. Hope that helps. -- Dave Balmain http://www.davebalmain.com/