Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 90448 invoked from network); 10 Feb 2004 22:32:48 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 10 Feb 2004 22:32:48 -0000 Received: (qmail 77229 invoked by uid 500); 10 Feb 2004 22:32:31 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 77203 invoked by uid 500); 10 Feb 2004 22:32:30 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 77185 invoked from network); 10 Feb 2004 22:32:30 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 10 Feb 2004 22:32:30 -0000 Received: (qmail 18361 invoked by uid 50); 10 Feb 2004 22:32:55 -0000 Date: 10 Feb 2004 22:32:55 -0000 Message-ID: <20040210223255.18360.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: lucene-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 26702] - [PATCH] arbitrary sorting X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26702 [PATCH] arbitrary sorting ------- Additional Comments From cutting@apache.org 2004-02-10 22:32 ------- I don't think we ought to make this contingent on adding typed Fields to Documents. That's a big change, perhaps one that should eventually be made, but I think we can easily make this change without going that far. So I'd prefer there be a way to explicitly name the types when making the search, rather than relying on pattern matching, perhaps something like: public abstract class SortField { public static final int SCORE = 0; // sort by score public static final int DOC = 1; // sort by doc number public static final int AUTO = 2; // guess type of named field public static final int STRING = 3; // sort by named field as String public static final int INT = 4; // sort by named field as int pubilc static final int FLOAT = 5; // sort by named field as float private String field; private int type = AUTO; } TopFieldDocs search (Query q, Filter f, int n, SortField[] sort_fields); Would that work? --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org