lucene-dev mailing list archives

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


Michael McCandless updated LUCENE-3518:

    Attachment: LUCENE-3518.patch

New patch: I also added TermValDocValuesComparator, so you can
sort-by-string when you indexed the non-sorted byte[] doc values types
(var/fixed X straight/deref).  This is slower since it aways does a
.compareTo on each ByteRef instead of using pre-sorted ords... but for
some apps this is a good tradeoff.  (This mirrors the two sort-by-Term
field comparators we have for field cache).

I also cleaned up how we handle segments that had no doc values; this
isn't necessarily an error condition because it could be the current
search doesn't hit any docs in this segment.  I added methods in
IndexDocValues to get a Source or SortedSource that always returns the
"default" value for the type.

I think this is ready!

> 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