You can approximate it by doing something like:
A:"phrase"^100000 B:"phrase"^10000 C:"phrase"^1000 D:"phrase"^100
E:"phrase"^30 <rest of query>


Thanks for suggestion Mike.  I tried boosting like this but all docs get
slightly different scores (because of tf, idf etc) and so secondary sort on
field X has no impact.  I'm thinking now I will try a custom
SortComparatorSource impl (based on DistanceComparatorSource in Lucene In
Action) using fixed values corresponding to matches in field A, B or C etc.
Will then use that as primary sort followed by the secondary sort on field
X.

Think I will have to modify o.a.s.s.QueryParsing.parseSort to hook in custom
sort.  Is there any better way?

Kind Regards,
Simon

Reply via email to