Hello All, I am looking out to implement sorting in my lucene application. This is what my code look like.
I am using StandardAnalyzer() analyzer. Query query = QueryParser.parse(keyword, "contents", analyzer); Sort sortCol = new Sort(new SortField("date")); // date is one of the field I have indexed. Hits hits = searcher.search(query, sortCol); for (int start = 0; start < hits.length(); start ++) { Document doc = hits.doc(start); // get all the data required. } I get this error : no terms in field sdate - cannot determine sort type Can any let me know where I am wrong ? Also what is the default sorting in lucene ? Also can some one explain what exactly is the score ? Is it something to do with ranking ? Do somebody have a link to a good lucene tutorial ? Thanks Mahaveer --------------------------------- Do you Yahoo!? Dress up your holiday email, Hollywood style. Learn more.