lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Yee <yee.bri...@gmail.com>
Subject Fwd: Solr learning to rank features question
Date Tue, 29 Aug 2017 16:09:20 GMT
Hello,

I have a somewhat complex solr filter query that I am hoping to turn into a
feature for learning to rank, but I am not sure if it's possible. I would
like to OR two fq together for one of my features. I have a cutoff date and
I need to check one field if NOW is before the cutoff, and a different
field if NOW is after the cutoff. Is this possible?

Something to the effect of this:
{
  "name" : "FeatureA",
  "store" : "commonFeatureStore",
  "class" : "org.apache.solr.ltr.feature.SolrFeature",
  "params" : {
    "fq" : [
      "{!frange l=NOW}CutOffDate",
      "{!term f=PreCutOffZones}${zone}"
    ]
    OR
    "fq" : [
      "{!frange u=NOW}CutOffDate",
      "{!term f=PostCutOffZones}${zone}"
    ]
  }
},

Thank you!
Brian Yee

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message