[
https://issues.apache.org/jira/browse/SOLR-2134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915809#action_12915809
]
Ryan McKinley commented on SOLR-2134:
-------------------------------------
{quote}
The problem with the approach of setting infinity as replacement value is, that
NaN values are still undefined and may be ordered before/after these infinity
values. But I think the problem is minor.
The same problem applies if you have infinity itsself or for long/double
min/max values as field value, then the sorting is also undefined (the not set
values should go after/before all real infinities).
{quote}
what behavior would you expect when a values in NaN or +- infinity? It seems
OK to have that be undefined (but towards the end)
Alternativly we could do something like:
{code:java}
@Override
public void copy(int slot, int doc) {
if( checkMissing ) {
if( cached.valid != null && cached.valid != null &&
!cached.valid.get(doc) ) {
values[slot] = missingValue;
return;
}
if( cached.values[doc] == Double.NaN ) {
cached.values[doc] = missingValue; //??? perhaps check sign and go
2+- that value? 2 because INFINITY may be +- 1
}
else if( cached.values[doc] == Double.POSITIVE_INFINITY ) {
cached.values[doc] = Double.POSITIVE_INFINITY - 1; //??? 2 just
}
else if( cached.values[doc] == Double.NEGATIVE_INFINITY ) {
cached.values[doc] = Double.NEGATIVE_INFINITY + 1; //???
}
}
values[slot] = cached.values[doc];
}
{code}
I have not checked that adding anything to infinity is different... it is CS,
not the real world afterall
> Trie* fields should support sortMissingLast=true, and deprecate Sortable*
> Field Types
> -------------------------------------------------------------------------------------
>
> Key: SOLR-2134
> URL: https://issues.apache.org/jira/browse/SOLR-2134
> Project: Solr
> Issue Type: Improvement
> Components: Schema and Analysis
> Reporter: Ryan McKinley
> Attachments: SOLR-2134-SortMissingLast.patch,
> SOLR-2134-SortMissingLast.patch, SOLR-2134-SortMissingLast.patch,
> SOLR-2134-SortMissingLast.patch
>
>
> With the changes in LUCENE-2649, the FieldCache also returns if the bit is
> valid or not. This is enough to support sortMissingLast=true with Trie*
> fields. Then we can get rid of the Sortable* fields
--
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: [email protected]
For additional commands, e-mail: [email protected]