Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 74285 invoked from network); 3 Jan 2005 09:56:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Jan 2005 09:56:56 -0000 Received: (qmail 50718 invoked by uid 500); 3 Jan 2005 09:55:28 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 50634 invoked by uid 500); 3 Jan 2005 09:55:26 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 50493 invoked by uid 99); 3 Jan 2005 09:55:24 -0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,FROM_ENDS_IN_NUMS,HTML_20_30,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from web42006.mail.yahoo.com (HELO web42006.mail.yahoo.com) (66.218.93.174) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 03 Jan 2005 01:55:18 -0800 Received: (qmail 53449 invoked by uid 60001); 3 Jan 2005 09:55:02 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=oR0j0e4DqVNPzXDrApWtD1tmLtJpk+eSKXQlCQcLGrJA5NYm6iu6RKuDPRZROLao7axu0jQmFB+P/YgxiNDevhFKyFBk+xswbPT1BeX24T1VBfIDh6XSgi1IM3i6R8c+bEAaWZjH0vOE6z8lQnCSP5jLpzG2soLGUfFhHsJfaGM= ; Message-ID: <20050103095502.53447.qmail@web42006.mail.yahoo.com> Received: from [219.64.139.33] by web42006.mail.yahoo.com via HTTP; Mon, 03 Jan 2005 01:55:02 PST Date: Mon, 3 Jan 2005 01:55:02 -0800 (PST) From: mahaveer jain Subject: Help for sorting To: lucene-user@jakarta.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1745283466-1104746102=:52115" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-1745283466-1104746102=:52115 Content-Type: text/plain; charset=us-ascii 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. --0-1745283466-1104746102=:52115--