You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2014/07/19 14:09:38 UTC
[jira] [Updated] (LUCENE-5835) Add sortMissingLast support to
TermValComparator
[ https://issues.apache.org/jira/browse/LUCENE-5835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrien Grand updated LUCENE-5835:
---------------------------------
Attachment: LUCENE-5835.patch
Here is a patch. I removed the notes about removing TermValComparator as it is the only way to sort a field that has binary doc values.
Other than that:
- it can now sort missing values last
- you can override the terms and docsWithField that are used for comparison
- you can override the detection for null values. This is typically useful if there is a sentinel value that represents null.
I didn't add support for custom missing values as I'm not sure it is a common need on binary/string content but it is easy to implement on top of this comparator by overriding {{getDocsWithField}} to return a Bits.MatchAllBits set and wrap the binary dv returned by {{getBinaryDocValues}}.
> Add sortMissingLast support to TermValComparator
> ------------------------------------------------
>
> Key: LUCENE-5835
> URL: https://issues.apache.org/jira/browse/LUCENE-5835
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Minor
> Fix For: 5.0, 4.10
>
> Attachments: LUCENE-5835.patch
>
>
> It would be nice to allow to configure the behavior on missing values for this comparator, similarly to what TermOrdValComparator does.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org