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 <[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to