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

Reply via email to