That might work, but this might be clearer:

q={!boost b=recip(dist(2, 0, star_rating, 0, 3),1,10,10) v=$mlt}&
mlt={!mlt qf=name,description,facilities,resort,region,dest_level_2
mintf=1 mindf=3 maxqt=100}43083

Upayavira

On Tue, Dec 29, 2015, at 12:00 PM, Alessandro Benedetti wrote:
> I simply concatenated them :
> 
> q={!boost b=recip(dist(2,0,star_rating,0,3),1,10,10)}{!mlt
> qf=name,description,facilities,resort,region,dest_level_2 mintf=1 mindf=3
> maxqt=100}43083
> 
> From the debug query the syntax is fine.
> 
> Am i correct ?
> 
> Cheers
> 
> On 29 December 2015 at 11:48, Alessandro Benedetti
> <abenede...@apache.org>
> wrote:
> 
> > Hi Upaya,
> > talking about wrapping the MLT query parser with additional query parsers :
> >
> > let's assume I want to run my MLT query + 2 boost functions on the results
> > to affect the ranking.
> >
> > Can you give me an example of how to wrap them together ?
> >
> > Those two are the independent pieces :
> > {!boost b=recip(dist(2, 0, star_rating, 0, 3),1,10,10)}
> > {!mlt qf=name,description,facilities,resort,region,dest_level_2 mintf=1
> > mindf=3 maxqt=100}43083
> >
> > Cheers
> >
> > Cheers
> >
> > On 24 December 2015 at 21:18, Upayavira <u...@odoko.co.uk> wrote:
> >
> >> If you are going to go that far, you can get the parsed query from the
> >> debug output, but seriously, if you are using a latest Solr and don't
> >> need the stream.body functionality in MLT, then use the MLT query
> >> parser, it is by far the best way to do it - as you get all the features
> >> of other query parsers and such for free.
> >>
> >> Upayavira
> >>
> >> On Thu, Dec 24, 2015, at 07:37 PM, Tim Hearn wrote:
> >> > One workaround is to use the 'important terms' feature to grab the query
> >> > generated by the MLT handler, then parse that list into your own solr
> >> > query
> >> > to use through a standard search handler.  That way, you can get the
> >> same
> >> > results as if you used the MLT handler, and you can also use filter
> >> > querying, highlighting, etc.
> >> >
> >> > Note:  I am currently running a Solr 5.0.0 Single-Core installation
> >> >
> >> > On Thu, Dec 24, 2015 at 11:57 AM, Upayavira <u...@odoko.co.uk> wrote:
> >> >
> >> > > Which morelikethis are you using? Handler, SearchComponent or
> >> > > QueryParser?
> >> > >
> >> > > You should be a able to wrap the mlt query parser with the boost query
> >> > > parser with no problem.
> >> > >
> >> > > Upayavira
> >> > >
> >> > > On Thu, Dec 24, 2015, at 05:18 AM, Binoy Dalal wrote:
> >> > > > Have you tried applying the boosts to individual fields with mlt.qf?
> >> > > > Optionally, you could get the patch that is on jira and integrate
> >> it into
> >> > > > your code if you're so inclined.
> >> > > >
> >> > > > On Thu, 24 Dec 2015, 03:17 CrazyDiamond <crazy_diam...@mail.ru>
> >> wrote:
> >> > > >
> >> > > > > So no way to apply boost to mlt or any other way to change order
> >> of
> >> > > > > document
> >> > > > > in mlt result? also may be there is a way to make to mlt query  at
> >> > > once and
> >> > > > > merge.
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > --
> >> > > > > View this message in context:
> >> > > > >
> >> > >
> >> http://lucene.472066.n3.nabble.com/mlt-and-document-boost-tp4246522p4247154.html
> >> > > > > Sent from the Solr - User mailing list archive at Nabble.com.
> >> > > > >
> >> > > > --
> >> > > > Regards,
> >> > > > Binoy Dalal
> >> > >
> >>
> >
> >
> >
> > --
> > --------------------------
> >
> > 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
> >
> 
> 
> 
> -- 
> --------------------------
> 
> 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