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

   1. require 'rdig'
   2. require 'rdig_config'

I have the following code in my /config/rdig_config.rb

   1. RDig.configuration do |cfg|
   2.   cfg.crawler.start_urls = [ 'http://localhost:3000/login/index' ]
   3.   cfg.index.path =
"C:/rails/managedsupport/index/development/rdig-index"
   4.   cfg.verbose = true
   5.   cfg.content_extraction = OpenStruct.new(
   6.     :hpricot      => OpenStruct.new(
   7.       :title_tag_selector => 'title',
   8.       :content_tag_selector => 'body'
   9.     )
  10.   )
  11.
  12. end

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

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

   1. search_results = RDig.searcher.search("some_string")
   2.      @results = search_results[:list]
   3.      @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:)
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to