# Ferret with Rdig - Indexing between tags

**URL:** <https://www.ruby-forum.com/t/ferret-with-rdig-indexing-between-tags/144695>\
**Category:** Ferret\
**Created:** [August 1, 2008, 9:38am UTC](https://www.ruby-forum.com/t/ferret-with-rdig-indexing-between-tags/144695 "2008-08-01T09:38:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![slum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f1d935/32.png) [@slum](https://www.ruby-forum.com/u/slum)\
**Post date:** [August 1, 2008, 9:38am UTC](https://www.ruby-forum.com/t/ferret-with-rdig-indexing-between-tags/144695/1 "2008-08-01T09:38:09Z")

</div>

Hi,

I’m using Ferret and Rdig, and I’m trying to index HTML between tags  
without success :  
I just want to index data like this :  
\<! – startToIndex --\>  
Here’s my HTML code which I want to index

My code is the following :

cfg.content\_extraction = OpenStruct.new(

```
# HPRICOT configuration
# hpricot is the html parsing lib used by RDig. See
# http://code.whytheluckystiff.net/hpricot for usage information.
# Any code blocks given for content selection will receive an

```

Hpricot instance  
# containing the full page content when called.  
:hpricot =\> OpenStruct.new(  
# css selector for the element containing the page title  
:title\_tag\_selector =\> ‘title’,  
# might also be a proc returning either an element or a string:  
# :title\_tag\_selector =\> lambda { |hpricot\_doc| … }  
:content\_tag\_selector =\> ‘body’  
# might also be a proc returning either an element or a string:  
# :content\_tag\_selector =\> lambda { |hpricot\_doc| … }  
)  
)

Any help would be helpful 🙂

Best regards,
