From solr-user-return-141053-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Fri May 4 08:52:44 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CCC39180634 for ; Fri, 4 May 2018 08:52:43 +0200 (CEST) Received: (qmail 11707 invoked by uid 500); 4 May 2018 06:52:40 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Delivered-To: moderator for solr-user@lucene.apache.org Received: (qmail 70399 invoked by uid 99); 4 May 2018 06:24:34 -0000 Content-Type: text/plain; charset=utf-8 MIME-Version: 1.0 In-Reply-To: <1525356000127-0.post@n3.nabble.com> X-Mailer: LuaSocket 3.0-rc1 Message-ID: x-ponymail-agent: PonyMail Composer/0.3 From: prateek.agarwal@bigbasket.com Date: Fri, 04 May 2018 06:24:33 -0000 Subject: Re: Regarding LTR feature To: References: <1525356000127-0.post@n3.nabble.com> x-ponymail-sender: d638d4fbc090e049c6c01dd27b272655a805ca5a Thanks again Alessandro I tried with the feature and the Minmax normalizer you told.But then there is a slight problem with the params in normalization. I don't really know the range(Min, Max) of values the payload_score outputs and they are different for different queries. I even tried looking at the source code to see if there is a way I can override a class so that it iterates over all the re-ranked documents and calculate Max and min there itself and pass it to MinMax normalizer class but it seems it's not possible. Your help will really appreciated. Thanks Regards, Prateek On 2018/05/03 14:00:00, Alessandro Benedetti wrote: > Mmmm, first of all, you know that each Solr feature is calculated per > document right ? > So you want to calculate the payload score for the document you are > re-ranking, based on the query ( your External Feature Information) and > normalize across the different documents? > > I would go with this feature and use the normalization LTR functionality : > > { > "store" : "my_feature_store", > "name" : "in_aggregated_terms", > "class" : "org.apache.solr.ltr.feature.SolrFeature", > "params" : { "q" : "{!payload_score > f=aggregated_terms func=max v=${query}}" } > } > > Then in the model you specify something like : > > "name" : "myModelName", > "features" : [ > { > "name" : "isBook" > }, > ... > { > "name" : "in_aggregated_terms", > "norm": { > "class" : "org.apache.solr.ltr.norm.MinMaxNormalizer", > "params" : { "min":"x", "max":"y" } > } > }, > } > > Give it a try, let me know > > > > > ----- > --------------- > 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 >