Excerpts from John Bachir's message of Fri Jan 19 15:57:35 -0800 2007:
> On Jan 17, 2007, at 5:26 PM, Benjamin Krause wrote:
> 
> >      FERRET_SPECIAL_CHARS = [ /:/, /\(/, /\)/, /\[/, /\]/, /!/, /\
> > +/, /"/, /~/, /\^/, /-/, /|/, />/, /</, /=/, /\*/, /\?/, /\./, /&/ ]
> 
> 1. Should $ be in the list?

There's a list at
http://ferret.davebalmain.com/api/classes/Ferret/QueryParser.html
and $ doesn't seem to be on it. (Neither does & or .)

> 2. Here is the solution I came up with, (nothing mind shattering but  
> I thought some folks on the list might appreciate seeing it):
> 
> query = (query.split('') - (FERRET_SPECIAL_CHARS - CONFIG 
> [:allowed_ferret_syntax])).join()

Doesn't this also eliminate escaped versions of the special characters?
(Might not be a problem, depending on the specifics of the corpus.)

-- 
William <[EMAIL PROTECTED]>
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to