lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-2426) change sort order to binary order
Date Tue, 22 Jun 2010 14:53:54 GMT


Michael McCandless commented on LUCENE-2426:

bq. How to deal with Term?

Maybe we should keep it, but do a hard cutover of its .text from String to BytesRef, and also
change its .compareTo to compare text by unicode code point order?

I agree we should do this as a followon issue; in fact I think another issue is already open.

Note, though, that field names still sort by UTF16 (String.compareTo) order.

> change sort order to binary order
> ---------------------------------
>                 Key: LUCENE-2426
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 3.1
>            Reporter: Robert Muir
>             Fix For: 4.0
>         Attachments: LUCENE-2426.patch, LUCENE-2426.patch, LUCENE-2426_automaton.patch
> Since flexible indexing, terms are now represented as byte[], but for backwards compatibility
reasons, they are not sorted as byte[], but instead as if they were char[].
> I think its time to look at sorting terms as byte[]... this would yield the following
> * terms are more opaque by default, they are byte[] and sort as byte[]. I think this
would make lucene friendlier to customizations.
> * numerics and collation are then free to use their own encoding (full byte) rather than
avoiding the use of certain bits to remain compatible with char[] sort order.
> * automaton gets simpler because as in LUCENE-2265, it uses byte[] too, and has special
hacks because terms are sorted as char[]

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message