# Highlight raises Segmentation Fault Error in Ferret 0.10.9 i

**URL:** <https://www.ruby-forum.com/t/highlight-raises-segmentation-fault-error-in-ferret-0-10-9-i/85758>\
**Category:** Ferret\
**Created:** [February 16, 2007, 3:07am UTC](https://www.ruby-forum.com/t/highlight-raises-segmentation-fault-error-in-ferret-0-10-9-i/85758 "2007-02-16T03:07:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ee7513/32.png) [@amit](https://www.ruby-forum.com/u/amit)\
**Post date:** [February 16, 2007, 3:07am UTC](https://www.ruby-forum.com/t/highlight-raises-segmentation-fault-error-in-ferret-0-10-9-i/85758/1 "2007-02-16T03:07:05Z")

</div>

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 = “”)

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

---

<div class="post-metadata">

**Author:** ![amit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ee7513/32.png) [@amit](https://www.ruby-forum.com/u/amit)\
**Post date:** [February 16, 2007, 4:22am UTC](https://www.ruby-forum.com/t/highlight-raises-segmentation-fault-error-in-ferret-0-10-9-i/85758/2 "2007-02-16T04:22:45Z")

</div>

On 2/16/07, amit [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> :post\_tag = “”)
> 
> 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

It 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.
