Hi everyone,

I searched an index with 3 its' fields({"name", "addr", "fullname"}), and used 
DisjunctionMaxQuery to rank the results by the max score of 3 fields.  When the 
hits have same score, lucene would rank by doc Id(low doc Id would be front). 


But I don't want rank by doc Id in that case. I would rank by field. If the 
hits have same score, I expect that the hit which's score (max score) is from 
field "name"  is front to the hit which's score is from other field.


I think the customer Collector & HitQueue is good idea and rewrite the method 
PriorityQueue.lessThan could change rank in priority queue. Unfortunately, the 
info in ScoreDoc is too less. And it's hard to get the source of max score for 
every hits.


Someone else know how to solve it? Thx!


Regards,


------------------
Harry YuInstitute of Remote Sensing and Geographic Information System.
School of Earth and Space Sciences, Peking University;
Beijing, China, 100871;
Email: 502437...@qq.com OR harryyu1...@163.com

Reply via email to