Do sorting properly in lucene