Iam new to ferret Iam trying to do a sample application on ferret
this is my code:
class SearchController < ApplicationController
require ‘ferret’
include Ferret
index = Index::Index.new(:path => ‘/path/to/index’)
def list
end
def index
index << {:title => "Programming Ruby", :content => "blah blah
blah"}
index << {:title => “Programming Ruby”, :content => “yada yada
yada”}
count=index.search_each(‘content:“blah”’) do |doc, score|
puts “Document #{doc} found with a score of #{score}”
end
puts count
end
end
This is wht i ended up with:
http://localhost:3000/search/index
SystemStackError in SearchController#index
stack level too deep
RAILS_ROOT: ./script/…/config/…
Application Trace | Framework Trace | Full Trace
#{RAILS_ROOT}/app/controllers/search_controller.rb:11:in index' #{RAILS_ROOT}/app/controllers/search_controller.rb:11:in
index’
.
.
.
Reply please if some one know the answer