Christine Poerschke created SOLR-11329:
------------------------------------------
Summary: contrib/ltr FieldValueFeature is silently 0.0 for
external file fields
Key: SOLR-11329
URL: https://issues.apache.org/jira/browse/SOLR-11329
Project: Solr
Issue Type: Bug
Components: contrib - LTR
Affects Versions: 6.6
Reporter: Christine Poerschke
Priority: Minor
By observation
{code}
{
"name" : "popularityScoreAsFieldValueFeature",
"class" : "org.apache.solr.ltr.feature.FieldValueFeature",
"params" : { "field" : "popularity_score" }
}
{code}
returns a score of 0.0 for [external file
fields|https://lucene.apache.org/solr/guide/6_6/working-with-external-files-and-processes.html]
e.g.
{code}
<fieldType name="id2float" keyField="handle" defVal="0"
class="solr.ExternalFileField" valType="float" />
<field name="popularity_score" type="id2float" />
{code}
is schema content for the field.
In comparison (and as a workaround of sorts)
{code}
{
"name" : "popularityScoreAsSolrFeature",
"class" : "org.apache.solr.ltr.feature.SolrFeature",
"params" : { "q" : "{!func}field(popularity_score)" }
}
{code}
returns the correct value.
The [FieldValueFeature
javadocs|http://lucene.apache.org/solr/6_6_0/solr-ltr/org/apache/solr/ltr/feature/FieldValueFeature.html]
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
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]