Use two fields, one for exact, one for phonetic. Use the edismax query handler 
and set 
a higher weight on the exact field.

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)

> On Jun 18, 2019, at 5:23 PM, Ruslan Dautkhanov <dautkha...@gmail.com> wrote:
> 
> We're using phonetic filters (BMPM), and we want to boost exact matches if
> there are any.
> 
> For example, for name "stephen" BM filter will generate two terms: stifn,
> stipin
> And for example it'll find for name "stepheM" (misspelled last letter),
> it'll match on the same two terms.
> 
> This makes match score of "stephen" same to "stephe*m*" (misspelled) and
> "stephen"
> (exact match).
> 
> We want to boost score for exact matches.
> What is a good way to do it?
> 
> A workaround is to duplicate first_name and not to do phonetic filter on
> that one.
> But then we would need to change how our application calls (add one field
> to query ).
> 
> It would be great if we can boost exact match without adding new fields /
> changing
> application query to explicitly specify two fields - exact and phonetic.
> 
> 
> Thank you,
> Ruslan

Reply via email to