lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahaveer jain <>
Subject Help for sorting
Date Mon, 03 Jan 2005 09:55:02 GMT

Hello All, 

I am looking out to implement sorting in my lucene application. This is what my code look

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 =, 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 ? 



Do you Yahoo!?
 Dress up your holiday email, Hollywood style. Learn more.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message