lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McKinley <ryan...@gmail.com>
Subject Re: Example schema - fieldType phonetic
Date Thu, 24 Feb 2011 15:54:26 GMT
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


Mime
View raw message