lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: whats the correct way to do normalisation?
Date Tue, 07 Nov 2006 19:34:19 GMT

http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-133cf44dd3dff3680c96c1316a663e881eeac35a

Are Wildcard, Prefix, and Fuzzy queries case sensitive?

Unlike other types of Lucene queries, Wildcard, Prefix, and Fuzzy queries
are not passed through the Analyzer, which is the component that performs
operations such as stemming and lowercasing.

The reason for skipping the Analyzer is that if you were searching for
"dogs*" you would not want "dogs" first stemmed to "dog", since that would
then match "dog*", which is not the intended query.


: Date: Tue, 7 Nov 2006 12:41:58 +0100 (CET)
: From: hans meiser <fischauto333@yahoo.de>
: Reply-To: java-user@lucene.apache.org
: To: java-user@lucene.apache.org
: Subject: Re: whats the correct way to do normalisation?
:
: Hi,
:
: On Nov 6, 2006, at 11:27 AM, hans meiser wrote:
: >> public final Token next() throws java.io.IOException {
: >> final Token t = input.next();
: >> if (t == null)
: >> return null;
: >> return new Token(removeAccents(t.termText()), t.startOffset(),
: >> t.endOffset(), t.type());
: >> }
: >>
:
: > For highlighting purposes, it's best to keep the offsets in the
: > original text, not adjusted for token mutation.
:
:   Ok, i corrected it.
:
:   For a  "normal" search without a "*" it works now. But when i do a
:   search with an "*" or a "?" my newly implemented filter is not called and for example
my umlauts are not replaced by the analyzer(filter).
:
:   I do a:
:   Analyzer analyzer = new SpecialCharsAnalyzer();
:   QueryParser parser = new QueryParser(DocumentFields.TEXT, analyzer);
:   query = parser.parse(queryStr);
:
:   For wildcards the tokenStream method of my analyzer isnt called.
:   Whats my fault?
:
:
: ---------------------------------
: Yahoo! 360° – Bloggen und Leute treffen. Erstellen Sie jetzt Ihre eigene Seite – kostenlos!.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message