Even after passing a sortfield, score of the document is effecting the sort order of the search results. Is there a way to make lucene to ignore the document score when a specific sort field is passed?
For ex:
DocId Score SortFieldA SortFieldB
1 23.0041 200906030800 Test
2 32.2774 200906020800 Test
3 21.0632 200906030800 Apple
I want the results to be sorted by SortFieldA first and then by SortFieldB. So in the above case the results should be and returned as doc2, doc3 and doc1. But because of the Score, the sort order is getting disturbed.
I noticed that the results are getting sorted properly if the documents have same score.
Code that sets the sort fields:
public override Sort GetSort()
{
List<SortField> sortFields = new List<SortField>();
sortFields.Add(new SortField(StartDateTime.ToString(), SortField.STRING, ReverseSort));
sortFields.Add(new SortField(TitleSort.ToString(), SortField.STRING, ReverseSort));
return new Sort(sortFields.ToArray());
}