lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Re[2]: Analyzer don't work with wildcard queries, snowball analyzer.
Date Fri, 01 Apr 2005 14:10:39 GMT

On Apr 1, 2005, at 8:09 AM, Sven Duzont wrote:
> Since wilcard queries are not analyzed, how can we deal with accents ?
> For instance (in french) a query like "ingé*" will not match documents 
> containing
> "ingénieur" but the query "inge*" will.

I presume your analyzer normalized accented characters?  Which analyzer 
is that?

You will need to employ some form of character normalization on 
wildcard queries too.

	Erik


>
> Thanks
>
> ---
>  sven
>
> Le jeudi 31 mars 2005 à 17:51:25, vous écriviez :
>
> EH> Wildcard terms simply are not analyzed.  How could it be possible 
> to do
> EH> this?  What if I search for "a*" - how could you stem that?
>
> EH> 	Erik
>
> EH> On Mar 31, 2005, at 9:51 AM, Ernesto De Santis wrote:
>
>>> Hi
>>>
>>> I get an unexpected behavior when use wildcards in my queries.
>>> I use a EnglishAnalyzer developed with SnowballAnalyzer. version
>>> 1.1_dev from Lucene in Action lib.
>>>
>>> Analysis case:
>>> When use wildcards in the middle of one word, the word in not 
>>> analyzed.
>>> Examples:
>>>
>>>            QueryParser qp = new QueryParser("body", analyzer);
>>>            Query q = qp.parse("ex?mple");
>>>            String strq = q.toString();
>>>            assertEquals("body:ex?mpl", strq);
>>> //FAIL strq == body:ex?mple
>>>
>>>            qp = new QueryParser("body", analyzer);
>>>            q = qp.parse("ex*ple");
>>>            strq = q.toString();
>>>            assertEquals("body:ex*pl", strq);
>>> //FAIL strq == body:ex*ple
>>>
>>> With this behavior, the search does not find any document.
>>>
>>> Bye
>>> Ernesto.
>>>
>>> -- 
>>> Ernesto De Santis - Colaborativa.net
>>> Córdoba 1147 Piso 6 Oficinas 3 y 4
>>> (S2000AWO) Rosario, SF, Argentina.
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> EH> 
> ---------------------------------------------------------------------
> EH> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> EH> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
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