如何使用用户功能提取SOLR LTR中的特征

时间:2018-10-30 11:33:58

标签: solr

[
  {
    "store": "esFeatureStore",
    "name": "queryInTitle",
    "class": "org.apache.solr.ltr.feature.SolrFeature",
    "params": {
      "q": "{!func}termfreq(title,$user_query)&user_query=${user_query}"
    }
  },
  {
    "store": "esFeatureStore",
    "name": "originalScore",
    "class": "org.apache.solr.ltr.feature.OriginalScoreFeature",
    "params": {}
  }
]



"error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","java.lang.NullPointerException"
    ],
    "msg":"java.lang.RuntimeException: Exception from createWeight for SolrFeature [name=queryInTitle, params={q={!func}termfreq(title,$user_query)&user_query=${user_query}`enter code here`}] null",
    "code":400}}

这是我在solr中的功能配置,但是当我查询时,出现异常

实际上,我想知道如何动态地使用函数。

0 个答案:

没有答案