You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Neils <ne...@gmx.net> on 2007/01/18 20:41:28 UTC

Analyzer

Hi,
 
I'm using the standard analyser for my index.
 
Currently I'm not sure if this is correct. I have a database with
Nameinformations inside.
One entry is e.g. "Dr.med Peter Sera"
 
When I'm searching with "dr and sera" i did not found the entry.
Of course, when i search with "dr* and sera" than it works, but this is only
a workaround cause i get also all names which starts with "dr....".
 
So I'm looking for a analyzer which allows me to search with "dr and sera"
for finding
above mentioned entry.
 
Is there any discription of the analyzers or can you suggest me one?
 
Thanks a lot ;-))
 

Re: Analyzer

Posted by Michael Garski <mg...@mac.com>.
Neils,

The StandardAnalyzer will create three terms from your example entry, 
'dr.med', 'peter', and 'sera'.  SimpleAnalyzer will analyze it into four 
terms, 'dr', 'med', 'peter', and 'sera'.  That may work for your needs, 
and I would suggest seeing how it affects other data you are indexing.

The book Lucene In Action goes over the analyzers in depth, including 
how to create your own should you need to do so.

Michael

Neils wrote:
> Hi,
>  
> I'm using the standard analyser for my index.
>  
> Currently I'm not sure if this is correct. I have a database with
> Nameinformations inside.
> One entry is e.g. "Dr.med Peter Sera"
>  
> When I'm searching with "dr and sera" i did not found the entry.
> Of course, when i search with "dr* and sera" than it works, but this is only
> a workaround cause i get also all names which starts with "dr....".
>  
> So I'm looking for a analyzer which allows me to search with "dr and sera"
> for finding
> above mentioned entry.
>  
> Is there any discription of the analyzers or can you suggest me one?
>  
> Thanks a lot ;-))
>  
>
>