Out of Date
Details
Assignee
UnassignedUnassignedReporter
Yoann RodièreYoann RodièreComponents
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Yoann Rodière
Yoann RodièreComponents
Priority
Created August 22, 2016 at 9:03 AM
Updated April 2, 2019 at 12:32 PM
Resolved April 2, 2019 at 12:32 PM
Providing a replacement for missing values in the sort DSL currently has two limitations:
1. One can only use it with numeric values, because
org.apache.lucene.search.SortField.setMissingValue(Object)
does not accept replacements for String values, and aSortField
is what we return ultimately.2. Field bridges are ignored, because:
Field bridges cannot convert an object to a numeric value (the most they can do is provide a String value by implementing
StringBridge
), butorg.apache.lucene.search.SortField.setMissingValue(Object)
expects numeric values for numeric fields, and aSortField
is what we return ultimately. Note thatsetMissingValue
won't break right away, butorg.apache.lucene.search.SortField.getComparator(int, int)
(called before sorting) will.String values are irrelevant (see 1. above)
These limitations should go away when dropping the reliance on the Lucene API in HS 6.0. Allowing to use field bridges on numeric fields might require some more work, though.