Hi Krishan, What if you remove the query() wrapping?
{ "name": "phraseMatch", "class": "org.apache.solr.ltr.feature.SolrFeature", "params": { "q": "{!complexphrase inOrder=true}fieldName:${input}" }, "store": "_DEFAULT_" } or even: { "name": "phraseMatch", "class": "org.apache.solr.ltr.feature.SolrFeature", "params": { "q": "{!complexphrase inOrder=true df=fieldName}${input}" }, "store": "_DEFAULT_" } On Tue, Aug 25, 2020 at 9:59 AM krishan goyal <krishan1...@gmail.com> wrote: > Hi, > > I am trying to create a phrase match feature (what "pf" does in > dismax/edismax parsers) > > I've tried various ways to set it up > > { > "name": "phraseMatch", > "class": "org.apache.solr.ltr.feature.SolrFeature", > "params": { > "q": "{!complexphrase inOrder=true}query(fieldName:${input})" > }, > "store": "_DEFAULT_" > } > > This fails with the exception > > Exception from createWeight for SolrFeature [name=phraseMatch, > params={q={!complexphrase inOrder=true}query(fieldName:${input})}] null > > But similar query works when used in the query reranking construct with > these params > > rqq: "{!complexphrase inOrder=true v=$v1}", > v1: "query(fieldName:"some text"~2^1.0,0)", > > What is the problem in the LTR configuration for the feature ? > -- Dmitry Kan Luke Toolbox: http://github.com/DmitryKey/luke Blog: http://dmitrykan.blogspot.com Twitter: http://twitter.com/dmitrykan SemanticAnalyzer: https://semanticanalyzer.info