Hi Alessandro,

Thanks for responding.

Let me take a step back and tell you the problem I have been facing with
this.So one of the features in my LTR model is:

{
"store" : "my_feature_store",
"name" : "in_aggregated_terms",
"class" : "org.apache.solr.ltr.feature.SolrFeature",
"params" : { "q" : "{!func}scale(query({!payload_score
f=aggregated_terms func=max v=${query}}),0,100)" }
}

so now with this feature if i apply FQ in solr it will scale the
values for all the documents irrespective of the FQ filter.

But if I change the feature to something like this:

{
"store" : "my_feature_store",
"name" : "in_aggregated_terms",
"class" : "org.apache.solr.ltr.feature.SolrFeature",
"params" : { "q" : "{!func}scale(query({!field f=aggregated_terms
v=${query}}),0,100)" }
}

Then the it scales properly with FQ aswell.

And about that verification I simply check the results returned like
in Case 1 after applying the FQ filter that feature score doesn't
scale to its maximum value of 100 which i think is because of the fact
that it scales over all the documents and returns only the subset with
the FQ filter applied.

Alternatively is their any way I can scale these value during
normalization time with a customized class which iterates over all the
re-ranked documents only.

Thanks a lot in advance.

Looking forward to hearing back from you soon.


Regards,

Prateek

On 2018/04/30 11:58:44, Alessandro Benedetti <a...@sease.io> wrote: > Hi Prateek,> > with query and FQ Solr is expected to score a document only if that document> > is a match of all the FQ results intersected with the query results [1].> > Then re-ranking happens, so effectively, only the top K intersected> > documents will be re-ranked.> > > If you are curious about the code, this can be debugged running a variation> > of org.apache.solr.ltr.TestLTRWithFacet#testRankingSolrFacet (introducing> > filter queries ) and setting the breakpoint somewhere around :> > org/apache/solr/ltr/LTRRescorer.java:181> > > Can you elaborate how you have verified that is currently not working like> > that ?> > I am familiar with LTR code and I would be surprised to see this different> > behavior> > > [1] https://lucidworks.com/2017/11/27/caching-and-filters-and-post-filters/> > > > > -----> > ---------------> > Alessandro Benedetti> > Search Consultant, R&D Software Engineer, Director> > Sease Ltd. - www.sease.io> > --> > Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html> >

Reply via email to