I dunno why that doesn't work but try {!mlt ... v=$master_id} and set a default 
value in your config for master_id and that should at least work. 

   Erik

> On Dec 30, 2015, at 08:37, Alessandro Benedetti <abenede...@apache.org> wrote:
> 
> I was taking a look to this article from Yonik [1] .
> I like the feature and actually it could useful for some use cases of mine.
> Started to play with it in Solr 5.4 .
> 
> I verified it is working if you pass both the query and the parameters to
> substitute as request parameters.
> 
> I verified it is working if you pass both the query and the parameters to
> substitute as defaults or appends for the request handler.
> 
> Currently I am not able to make it working the following scenario :
> solrconfig.xml
> 
> <requestHandler name="/getSimilar" class="solr.SearchHandler">
>>          <lst name="defaults">
>>               ...
>>              <str name="q">{!boost b=recip(dist(2,0,star_rating,0,
>> *${star_rating:3}*),1,10,10)}{!boost b=recip(geodist(lat_lon,*${lat:0}*,
>> *${lon:0}*),2,200,20)}{!mlt
>> qf=name,description,facilities,resort,region,dest_level_2 mintf=1 mindf=5
>> maxqt=50}*${master_id:0}*</str>
>>               ...
>>          </lst>
>>      </requestHandler>
> 
> 
> 
> Then I pass in the request the parameter to substitute , like :
> master_id=1 .
> Unfortunately is always getting the default one.
> Am i doing something wrong ?
> If it is known limitation I would be happy to contribute a fix, what are
> the components involved ?
> 
> Cheers
> 
> [1] http://yonik.com/solr-query-parameter-substitution/
> 
> -- 
> --------------------------
> 
> Benedetti Alessandro
> Visiting card : http://about.me/alessandro_benedetti
> 
> "Tyger, tyger burning bright
> In the forests of the night,
> What immortal hand or eye
> Could frame thy fearful symmetry?"
> 
> William Blake - Songs of Experience -1794 England

Reply via email to