Re: Custom Tokenizer not working

I changed XMLAnalyzer so that it does not inherit from
Ferret::Analysis::Analyzer. That seemed to have no effect.

I successfully ran ferret-browser.As shown below, I am using two
fields - :file and :content. When I browse through
the “file” term everything appears fine; all of the filenames are
found. The “content” term on the other hand is
empty. Apparently I’m not stuffing the tokens in the index at all. One
question I have is exactly what should happen
in the Tokenizer#text method and when will this method be called?


index = =>,
:path => options.indexLocation,
:create => true)

Find.find(options.searchPath) do |path|
if FileTest.file? path do |file|
puts "Adding file to index: " + path
index.add_document :file => path,
:content => file.readlines


On Wed, Apr 23, 2008 at 01:59:32PM -0400, S D wrote:

  • [unfortunately I received my messages as a batched digest…hence, I’m
    > forced to respond in a new thread. I’ve requested the administrator
    > change my config to receive each message on this list. Sorry for any
    > inconvenience]
    > Thanks for the response below. Here is XMLAnalyzer (currently I’m
    not using
    > the stop or lower case filter):
    > class XMLAnalyzer < Ferret::Analysis::Analyzer

could you try if not inheriting from Ferret’s Analyzer changes anything?
At least I usually don’t do that in my analyzers.


  • I just tried running ferret-browser by pointing to an index created with
    > StandardTokenizer and got the error below in Firefox. Is there any
    > configuration that is necessary? Presumably the defaults should
  • Internal Server Error No such file or directory -
    > /usr/local/lib/site_ruby/1.8/ferret/browser/views/error/index.rhtml
    > ------------------------------
    > WEBrick/1.3.1 (Ruby/1.8.6/2007-06-07) at

works just fine here (Ferret 0.11.6 / Ubuntu), just tried it out. The
location from the error message looks a bit strange to me, how did you
install ferret?


Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
kraemer at |

Amtsgericht Dresden | HRB 15422
GF Sven Haubold