The only method i can think of is, as you mention, define a second field 
containing the exact match without synonym expansion.

In that case you can just put a larger boost value for matches on that field to 
rank it higher. Just sort score desc and check debugQuery output before and 
after.

> Hello,
> Is there a way to boost the result that is an exact match as oppose to
> synonym match when using query time synonyms?
> Given the query John Smith and synonyms
> Jonathan,Jonathan,John,Jon,Nat,Nathan
> 
> I'd like result containing John Smith to be ranked higher then Jonathan
> Smith.
> My thinking was to do it by defining 2 fields: 1 with query time synonyms
> and 1 without and sort by a function query of a non-synonym field. Is it
> even possible? I can't quite figure out the syntax for this.
> I'm using Solr 3.1.
> 
> Thanks,
> Dmitriy

Reply via email to