lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3518) Add sort-by-term with DocValues
Date Thu, 20 Oct 2011 17:58:10 GMT


Michael McCandless commented on LUCENE-3518:

Thanks Simon, I'll fix the nocommit and add some comments.. the
ord/BytesRef comparators are tricky...

bq. this seems to be very specific to in-memory docvalues while we don't support direct source

Hmm, true; though I suspect sorting by a direct source will be rather
slow.  Still I agree we should support it for completeness.

bq. Can we maybe extract an interface from PackedInts.Reader & RandomAccessReaderIterator
(those are already very similar) so we can simply use the reader interface for both on-disk
and in-memory variants.

OK I like your idea of using PackedInts.Reader for on-disk and
in-memory variants; you shouldn't have to pull an enum from PackedInts
if you just need the disk-based get.

I'll open a new issue to do that refactoring first; I think we can
remove the PackedInts.RandomAccessReaderIterator if we just let the
Reader.get throw IOE?  Lemme try to work up a patch.

> Add sort-by-term with DocValues
> -------------------------------
>                 Key: LUCENE-3518
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: core/search
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 4.0
>         Attachments: LUCENE-3518.patch, LUCENE-3518.patch
> There are two sorted byte[] types with DocValues (BYTES_VAR_SORTED,
> BYTES_FIXED_SORTED), so you can index this type, but you can't yet
> sort by it.
> So I added a FieldComparator just like TermOrdValComparator, except it
> pulls from the doc values instead.
> There are some small diffs, eg with doc values there are never null
> values (see LUCENE-3504).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message