You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by nanshi <na...@gmail.com> on 2012/07/04 02:08:51 UTC

Re: Something like 'bf' or 'bq' with MoreLikeThis

Jack, can you please explain this in some more detail? Such as how to write
my own search component to modify request to add bq parameter and get
customized result back?

--
View this message in context: http://lucene.472066.n3.nabble.com/Something-like-bf-or-bq-with-MoreLikeThis-tp3989060p3992888.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Something like 'bf' or 'bq' with MoreLikeThis

Posted by nanshi <na...@gmail.com>.
Amit, I am using Solr3.6 and directly imported apache-solr-3.6.0.war into
Eclipse (Indigo). I will need to directly invoke a MoreLikeThis(/mlt) call
using a unique id to get MoreLikeThis results. 

The hard part is that I need to use a float number field (that i cannot use
mlt.fl or mlt.fq since it's not a string) in the matched document of the MLT
response to find MLT results - this is purely for relevance improvement. 

I found a work around that I can use a standard query parameter
fq=Rating:[1.5 TO 2.5]; however, for the run time queries, i have to extract
the rating number from the matched doc(/mlt?q=id:12345) that i dont know how
to extract this at run time.... If the matched rating is 2, for instance,
then i can construct [1.5 TO 2.5] to say that 2 is more like a value within
the range from 1.5 to 2.5....So, the same thing i will encounter if i use a
bf parameter to calculate distance, i will still need to get the Rating
value out of the matched document.


--
View this message in context: http://lucene.472066.n3.nabble.com/Something-like-bf-or-bq-with-MoreLikeThis-tp3989060p3993079.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Something like 'bf' or 'bq' with MoreLikeThis

Posted by Amit Nithian <an...@gmail.com>.
No worries! What version of Solr are you using? One that you
downloaded as a tarball or one that you checked out from SVN (trunk)?
I'll take a bit of time and document steps and respond.

I'll review the patch to see that it fits a general case. Question for
you with MLT, are your users doing a blank search (no text) for
something or are you returning results More Like results that were
generated as a result of a user typing some text query. I may have
built this patch assuming a blank query but I can make it work (or try
to) make it work for text based queries.

Thanks
Amit

On Wed, Jul 4, 2012 at 1:37 AM, nanshi <na...@gmail.com> wrote:
> Thanks a lot, Amit! Please bear with me, I am a new Solr dev, could you
> please shed me some light on how to use a patch? point me to a wiki/doc is
> fine too. Thanks a lot! :)
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Something-like-bf-or-bq-with-MoreLikeThis-tp3989060p3992935.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: Something like 'bf' or 'bq' with MoreLikeThis

Posted by nanshi <na...@gmail.com>.
Thanks a lot, Amit! Please bear with me, I am a new Solr dev, could you
please shed me some light on how to use a patch? point me to a wiki/doc is
fine too. Thanks a lot! :)

--
View this message in context: http://lucene.472066.n3.nabble.com/Something-like-bf-or-bq-with-MoreLikeThis-tp3989060p3992935.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Something like 'bf' or 'bq' with MoreLikeThis

Posted by Amit Nithian <an...@gmail.com>.
I had a similar problem so I submitted this patch:
https://issues.apache.org/jira/browse/SOLR-2351

I haven't applied this to trunk in a while but my goal was to ensure
that bf parameters were passed down and respected by the MLT handler.
Let me know if this works for you or not. If there is sufficient
interest, I'll re-apply this patch to trunk and try and devise some
tests.

Thanks!
Amit

On Tue, Jul 3, 2012 at 5:08 PM, nanshi <na...@gmail.com> wrote:
> Jack, can you please explain this in some more detail? Such as how to write
> my own search component to modify request to add bq parameter and get
> customized result back?
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Something-like-bf-or-bq-with-MoreLikeThis-tp3989060p3992888.html
> Sent from the Solr - User mailing list archive at Nabble.com.