On 1/20/07, William Morgan <[EMAIL PROTECTED]> wrote:
> Excerpts from Aldous D. Penaranda's message of Fri Jan 19 01:33:51 -0800 2007:
> > Is there a way to make ferret recognize the 'and' inside the query as
> > a search term and not an operator? (I hope I got the terminology
> > right)
>
> You need to use an Analyzer that does not remove 'and'. The default
> analyzer removes all words in FULL_ENGLISH_STOP_WORDS, which includes
> 'and'. (So does ENGLISH_STOP_WORDS.)

Thanks. I noticed, however, that the documentation for
Ferret::Index::Index says that the default analyzer is
StandardAnalyzer. The StandardAnalyzer documentation says that it
filters LetterTokenizer with LowerCaseFilter. Are you talking about
StopAnalyzer? If so, perhaps the documentation is wrong and should be
updated. I've checked both the 0.9 and 0.10 api documentation and they
say the same thing.

> The analyzer needs to be used both while adding documents to the index
> and when parsing the query parsing time (i.e. passed to both
> QueryParser.new and IndexWriter.new/Index.new).  If you've been using
> the default analyzer, you'll have to reindex so that the occurrences of
> 'and' get written to disk.

Again, many thanks! I'll try this out after I get some sleep. :)

-- 
Linux Just Simply Rocks!
[EMAIL PROTECTED] | [EMAIL PROTECTED]
http://deathwing.penarmac.com/
GPG: 0xD6655C18
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to