Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
6.6
-
None
-
None
Description
By observation
{ "name" : "popularityScoreAsFieldValueFeature", "class" : "org.apache.solr.ltr.feature.FieldValueFeature", "params" : { "field" : "popularity_score" } }
returns a score of 0.0 for external file fields e.g.
<fieldType name="id2float" keyField="handle" defVal="0" class="solr.ExternalFileField" valType="float" /> <field name="popularity_score" type="id2float" />
is schema content for the field.
In comparison (and as a workaround of sorts)
{ "name" : "popularityScoreAsSolrFeature", "class" : "org.apache.solr.ltr.feature.SolrFeature", "params" : { "q" : "{!func}field(popularity_score)" } }
returns the correct value.
The FieldValueFeature javadocs mention no restrictions re: fields needing to be non-external (or stored or indexed or whatever).
Improvements that could be made under this ticket:
- extend the javadocs to clarify what is and what is not supported
- add (further) test cases for not supported scenarios
- maybe: add support for external file fields
- maybe: throw an exception or noisely log (instead of silently returning 0.0) in not supported scenarios