lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl <jan....@cominvent.com>
Subject Re: Example schema - fieldType phonetic
Date Thu, 24 Feb 2011 16:46:37 GMT
Thanks,

Is this difference on purpose?

Could you give a practical example for when PhoneticFilterFactory with encoder="DoubleMetaphone"
will yield different result from DoubleMetaphoneFilterFactory?
Shouldn't the PhoneticFilterFactory then have an extra mode encoder="EnhancedDoubleMetaphone"
or similar?

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

On 24. feb. 2011, at 16.54, Ryan McKinley wrote:

> The DoubleMetaphoneEncoder is slightly different then the standard
> Encoder-- it has two phonetic options rather then one.  Using the
> DoubleMetaphoneFilter will use both versions:
>      String primaryPhoneticValue = encoder.doubleMetaphone(v);
>      String alternatePhoneticValue = encoder.doubleMetaphone(v, true);
> 
> if you use the PhoneticFilter, it will just use one:
>     String v = encoder.encode(value).toString();
> in this case that is the primaryPhoneticValue
> 
> 
> 
> On Thu, Feb 24, 2011 at 5:07 AM, Jan Høydahl <jh@cominvent.com> wrote:
>> Hi,
>> 
>> The fieldtype "phonetic" is currently defined as
>> 
>>    <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField"
>
>>      <analyzer>
>>        <tokenizer class="solr.StandardTokenizerFactory"/>
>>        <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
>>      </analyzer>
>>    </fieldtype>
>> 
>> But isn't it more "correct" using PhoneticFilterFactory?
>> <filter class="solr.PhoneticFilterFactory" encoder="DoubleMetaphone" inject="false"/>
>> 
>> --
>> Jan Høydahl
>> Gründer & senior architect
>> Cominvent AS, Stabekk, Norway
>> www.cominvent.com
>> +47 90125809
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
> 


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


Mime
View raw message