Thanks for the feedback, I was getting correct results when searching for jon & john. But when I tried other names like 'khloe' it matched on 'collier' because the phonetic filter generated KL as the token. Is phonetic filter the best way to find similar sounding names?
On Wed, Mar 23, 2016 at 12:01 AM, davidphilip cherian < davidphilipcher...@gmail.com> wrote: > The "phonetic_en" analyzer definition available in solr-schema does return > documents having "Jon", "JN", "John" when search term is "John". Checkout > screen shot here : http://imgur.com/0R6SvX2 > > This wiki page explains how phonetic matching works : > > https://cwiki.apache.org/confluence/display/solr/Phonetic+Matching#PhoneticMatching-DoubleMetaphone > > > Hope that helps. > > > > On Wed, Mar 23, 2016 at 11:18 AM, Alexandre Rafalovitch < > arafa...@gmail.com> > wrote: > > > I'd start by putting LowerCaseFF before the PhoneticFilter. > > > > But then, you say you were using Analysis screen and what? Do you get > > the matches when you put your sample text and the query text in the > > two boxes in the UI? I am not sure what "look at my solr data" means > > in this particular context. > > > > Regards, > > Alex. > > ---- > > Newsletter and resources for Solr beginners and intermediates: > > http://www.solr-start.com/ > > > > > > On 23 March 2016 at 16:27, Jay Potharaju <jspothar...@gmail.com> wrote: > > > Hi, > > > I am trying to do name matching using the phonetic filter factory. As > > part > > > of that I was analyzing the data using analysis screen in solr UI. If i > > > search for john, any documents containing john or jon should be found. > > > > > > Following is my definition of the custom field that I use for indexing > > the > > > data. When I look at my solr data I dont see any similar sounding names > > in > > > my solr data, even though I have set inject="true". Is that not how it > is > > > supposed to work? > > > Can someone explain how phonetic matching works? > > > > > > <fieldType name="text_phonetic" class="solr.TextField" > > positionIncrementGap > > > ="100"> > > > > > > <analyzer> > > > > > > <tokenizer class="solr.StandardTokenizerFactory"/> > > > > > > <filter class="solr.PhoneticFilterFactory" > > encoder="DoubleMetaphone" > > > inject="true" maxCodeLength="5"/> > > > > > > <filter class="solr.LowerCaseFilterFactory"/> > > > > > > </analyzer> > > > > > > </fieldType> > > > > > > -- > > > Thanks > > > Jay > > > -- Thanks Jay Potharaju