Topic: Problems getting extract from RDig search

Hi All,

I have to have a site wide search for my current application. By search I mean I have to search the static and the dynamic contents from the database. I have been searching on this for a while on the net and RDig seems to be a apt solution. While using it I have encountered a few problems. I know these might be very basic issues but I have not been able to figure out what is wrong with the code.

I had the following lines in my /config/environment.rb

require 'rdig'
require 'rdig_config'

I have the following code in my /config/rdig_config.rb
RDig.configuration do |cfg|
  cfg.crawler.start_urls = [ 'http://localhost:3000/login/index' ]
  cfg.index.path = "C:/rails/managedsupport/index/development/rdig-index"
  cfg.verbose = true
  cfg.content_extraction = OpenStruct.new(
    :hpricot      => OpenStruct.new(
      :title_tag_selector => 'title',
      :content_tag_selector => 'body'
    )
  )

end


I have created the index file using the code
rdig -c config/rdig_config.rb

Now in my controller I have written a code for testing the functionality

search_results = RDig.searcher.search("some_string")
     @results = search_results[:list]
     @hitcount = search_results[:hitcount]

My @result[:extract] is returning me the same initial view code that is common to the application that is my menus and sub menus.. I am not getting the extract on the basis of which I had searched.

Any help in this regard would be highly appreciated..
Thanks in advance:)