lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahaveer jain <jainmahavee...@yahoo.com>
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
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.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message