sortfield does not has any effect when using with FieldComparator- Why?

kumaran <[email protected]>
Newsgroups gmane.comp.jakarta.lucene.user,gmane.comp.apache.commons.general
Message-ID <CAHTScUiEajFdJqUJ-QJz2a5enfRZ_EWdU=RcsmeTp1605CXzQw@mail.gmail.com>
i dont understand how sort by distance has been achieved using below
mentioned code.

Please explain me...how lucene handles sortfield if sortfield is ""?

   DistanceQueryBuilder queryBuilder = new
DistanceQueryBuilder(latitude, longitude, radius, "lat", "lon",
CartesianTierPlotter.DEFALT_FIELD_PREFIX, true);
   DistanceFieldComparatorSource distComp = new
DistanceFieldComparatorSource(queryBuilder.getDistanceFilter());
   Sort distSort = new Sort(new SortField("", distComp,false));


PS: i am using lucene 3.0.3

Raised the same here too.
http://stackoverflow.com/questions/22929423/how-lucene-handles-sortfield-with-comparator-if-sortfield-is


Kumaran R
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.