DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26702>. 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]