lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "alessandro.benedetti" <>
Subject Re: extract multi-features for one solr feature extractor in solr learning to rank
Date Fri, 21 Apr 2017 08:10:04 GMT
Hi Jianxiong, this is definitely interesting.
Briefly reviewing the paper you linked the use case seems clear :
You want similar "family" of features, to be calculated on each field.
Let's take as example the TF feature, you may want to define in the
features.json only one feature including all the fields involved :

    "store" : "MyFeatureStore", 
    "name" : "query_term_frequency", 
    "class" : "com.apache.solr.ltr.feature.TermCountFeature", 
    "params" : { 
       "fields" : ["field1","field2","field3"], 
       "terms" : "${user_terms}"

And then under the hood you would like this feature to be translated to N
features in the feature vector .

You have few solutions here :

1) out of the box, when you create the features.json, you do it
programmatically, your client app takes in input a simplified features.json
and it extends it automatically based on your custom config ( i was using
this approach to encode categorical features in N binary features)

2) you dive deep into the code and you add this flexibility to the plugin,
this will involve a modification in how currently the feature vector is


Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. -
View this message in context:
Sent from the Solr - User mailing list archive at

View raw message