Re: mlt and document boost

2015-12-29 Thread Alessandro Benedetti
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  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  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 
> 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


Re: mlt and document boost

2015-12-29 Thread Upayavira
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
> 
> 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  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  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 
> >> 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


Re: mlt and document boost

2015-12-29 Thread Alessandro Benedetti
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 
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  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  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 
>> 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


Re: mlt and document boost

2015-12-24 Thread Upayavira
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  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  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
> >


Re: mlt and document boost

2015-12-24 Thread Tim Hearn
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  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  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
>


Re: mlt and document boost

2015-12-24 Thread Upayavira
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  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


Re: mlt and document boost

2015-12-23 Thread CrazyDiamond
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.


Re: mlt and document boost

2015-12-23 Thread Binoy Dalal
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  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


Re: mlt and document boost

2015-12-22 Thread Binoy Dalal
If you're on solr 5.4.0, this is a bug.
https://issues.apache.org/jira/browse/SOLR-8418

On Tue, 22 Dec 2015, 19:01 CrazyDiamond  wrote:

> i use  Morelikethis query  and  i need to boost some documents at query
> time
> i've tried to use fq and ^ boost, it does not work.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/mlt-and-document-boost-tp4246522.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
-- 
Regards,
Binoy Dalal