Hmmm, seems like it should work.

First thing I'd try is using the admin interface and look at the analysis
page to
see how the input is tokenized both at index and search time, that's
sometimes
surprising.

Second, again using the browser, attach &debug=query to the URL. That will
echo back what the query actually parsed to. Combined with the analysis
page this last bit of information is often enough to figure it out. If that
doesn't
show it, please cut/paste the results back here....

You can do the same from your SolrJ program, but the admin UI is usually
faster.

Best
Erick


On Mon, Sep 2, 2013 at 3:25 PM, Sergio Stateri <stat...@gmail.com> wrote:

> Thanks Erick,
>
> I´m trying to looking for english texts now. I put a field type like this:
>
> <fieldtype name="myPhonetic" stored="false" indexed="true"
> class="solr.TextField" >
>   <analyzer>
>     <tokenizer class="solr.StandardTokenizerFactory"/>
>     <filter class="solr.PhoneticFilterFactory" encoder="DoubleMetaphone"
> inject="true"/>
>   </analyzer>
> </fieldtype>
> ...
> <field name="descricaoRoteiroPhonetic" type="myPhonetic" indexed="true"
> required="true" stored="true"/>
>
>
> Then I´m trying to find CITY, like this:
>
> SolrQuery query = new SolrQuery();
> query.setQuery("(descricaoRoteiroPhonetic:CITY)" );
> QueryResponse rsp = server.query( query );
> QueryResponse rsp = server.query( query );
>
>
> But there is not results, and I have a lot of documents with CITY in the
> descricaoRoteiroPhonetic field.
> Do you know what I´m doing wrong?
>
> Thanks a lot.
>
> Sergio Stateri Junior.
>
>
> 2013/9/2 Erick Erickson <erickerick...@gmail.com>
>
> > What you need to do is include one of the phonetic
> > filters in your analysis chain, see:
> >
> >
> http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.PhoneticFilterFactory
> > All you've done with the stemmer is make
> > things like (sorry, English examples are all I can do)
> > running, runner etc. be indexed and searched as "run",
> > not phonetic processing....
> >
> > There are several variants, each uses a different
> > algorithms at the link above. Not sure what to tweak
> > for handling Brazilian Portuguese though...
> >
> > Best
> > Erick
> >
> >
> > On Mon, Sep 2, 2013 at 1:41 PM, Sergio Stateri <stat...@gmail.com>
> wrote:
> >
> > > Please,
> > >
> > > How can I make I phonetic search in Solr with portuguese (brazilian)
> > > language?
> > >
> > > I tryied including this field type:
> > >
> > >     <fieldType name="brazilianPhonetic" class="solr.TextField"
> > > sortMissingLast="true" omitNorms="true">
> > > <analyzer type="index">
> > > <tokenizer class="solr.StandardTokenizerFactory"/>
> > > <filter class="solr.BrazilianStemFilterFactory"/>
> > > </analyzer>
> > > </fieldType>
> > > ...
> > > <field name="descricaoRoteiroPhonetic" type="brazilianPhonetic"
> > > multiValued="true" indexed="true" required="true" stored="true"/>
> > >
> > >
> > > But this didn´t work. I have no idea about how to make a phonetic
> search.
> > > I´m using Solr 4.
> > >
> > >
> > >
> > > Thanks in advance,
> > > --
> > > Sergio Stateri Jr.
> > > stat...@gmail.com
> > >
> >
>
>
>
> --
> Sergio Stateri Jr.
> stat...@gmail.com
>

Reply via email to