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 "Adamsky, Robert" <ra...@techtarget.com> on 2009/10/28 01:22:53 UTC

MLT cross core

Have two cores with some common fields in their schemas.  I want to
perform a MLT query on one core and get results from the other schema. 
Both cores have same type of id.

I saw this thread:
http://www.nabble.com/Does-MoreLikeThis-support-sharding--td25378654.html

This is not quite what I am doing as this is for shards against same schema.

How is it suggested to perform a MLT query cross core / schema?  Currently, I
only see getting the result from one core and performing a query with the common
fields in the second core and treating those results as MLT results.

Re: MLT cross core

Posted by Avlesh Singh <av...@gmail.com>.
>
> Does that mean that you cannot do a 'MLT' query from one core result to get
> MLT from another (even if there is some common schema between)?
>
You can always run MLT handlers on a core. Each MLT handler takes certain
parameters based on which "similar" results are fetched. You would need to
pass such parameters for MLT handler to work properly. It is immaterial
where do you get these values from. In your case it happens to be an outcome
of results from another core. As I said, it hardly matters.

Cheers
Avlesh

On Wed, Oct 28, 2009 at 10:10 PM, Adamsky, Robert
<ra...@techtarget.com>wrote:

>
> Thanks for the reply --
>
> >> In your multi-core set-up, I don't think you are anywhere close to using
> >> MLT. The arrangement looks more like a search query.
>
> Does that mean that you cannot do a 'MLT' query from one core result
> to get MLT from another (even if there is some common schema between)?
>

RE: MLT cross core

Posted by "Adamsky, Robert" <ra...@techtarget.com>.
Thanks for the reply --

>> In your multi-core set-up, I don't think you are anywhere close to using
>> MLT. The arrangement looks more like a search query.

Does that mean that you cannot do a 'MLT' query from one core result
to get MLT from another (even if there is some common schema between)?

Re: MLT cross core

Posted by Avlesh Singh <av...@gmail.com>.
>
> My thought now is I cannot use MLT and instead must do a query to B using
> the fields from core A ID as query params. Is there big difference in what
> will be returned as results using query instead of MLT?
>
Yes, there is definitely a difference between the results from a MLT handler
and any other search handler. MLT components/handlers are supposed to return
"similar" results based on stored TermVectors for a field. Search handlers
are supposed to return "exact" matching results based on indexed values for
a field.

In your multi-core set-up, I don't think you are anywhere close to using
MLT. The arrangement looks more like a search query.

Cheers
Avlesh

On Wed, Oct 28, 2009 at 5:37 PM, Adamsky, Robert <ra...@techtarget.com>wrote:

>
> > Have two cores with some common fields in their schemas.  I want to
> perform
> > a MLT query on one core and get results from the other schema. Both cores
> > have same type of id.
> >
> >Having the same "type of id" in two different cores is of no good for a
> MLT
> >handler (which in-fact operates on one core)
>
> Right; the cores share the same data type and name for their ID.
> Was hoping that would allow me to do the same thing I am doing for
> cross core queries on common schema fields - I can query one core and
> get aggregate results from both based on common fields.
>
> > How is it suggested to perform a MLT query cross core / schema?
>  Currently,
> > I only see getting the result from one core and performing a query with
> the
> > common fields in the second core and treating those results as MLT
> results.
> >
> >It depends on your requirement. If it is about simply aggregating the
> >results, then you can run MLT handler for both the cores independently and
> >merge the response thereafter based on your understanding of the
> underlying
> >data in the responses.
>
> Am trying to do the following given:
>
> - Two cores with common named and typed IDs (no dupes between them)
> - Some number of common fields for other data like title and body.
>
> Make a MLT query to core A (or event core B) passing in ID of core A and
> getting
> MLT results that have data from core B only.
>
> My thought now is I cannot use MLT and instead must do a query to B using
> the fields from core A ID as query params.
>
> Is there big difference in what will be returned as results using query
> instead
> of MLT?
>

RE: MLT cross core

Posted by "Adamsky, Robert" <ra...@techtarget.com>.
> Have two cores with some common fields in their schemas.  I want to perform
> a MLT query on one core and get results from the other schema. Both cores
> have same type of id.
>
>Having the same "type of id" in two different cores is of no good for a MLT
>handler (which in-fact operates on one core)

Right; the cores share the same data type and name for their ID.
Was hoping that would allow me to do the same thing I am doing for
cross core queries on common schema fields - I can query one core and
get aggregate results from both based on common fields.

> How is it suggested to perform a MLT query cross core / schema?  Currently,
> I only see getting the result from one core and performing a query with the
> common fields in the second core and treating those results as MLT results.
>
>It depends on your requirement. If it is about simply aggregating the
>results, then you can run MLT handler for both the cores independently and
>merge the response thereafter based on your understanding of the underlying
>data in the responses.

Am trying to do the following given:

- Two cores with common named and typed IDs (no dupes between them)
- Some number of common fields for other data like title and body.

Make a MLT query to core A (or event core B) passing in ID of core A and getting
MLT results that have data from core B only.

My thought now is I cannot use MLT and instead must do a query to B using
the fields from core A ID as query params.

Is there big difference in what will be returned as results using query instead
of MLT?

Re: MLT cross core

Posted by Avlesh Singh <av...@gmail.com>.
>
> Have two cores with some common fields in their schemas.  I want to perform
> a MLT query on one core and get results from the other schema. Both cores
> have same type of id.
>
Having the same "type of id" in two different cores is of no good for a MLT
handler (which in-fact operates on one core)

How is it suggested to perform a MLT query cross core / schema?  Currently,
> I only see getting the result from one core and performing a query with the
> common fields in the second core and treating those results as MLT results.
>
It depends on your requirement. If it is about simply aggregating the
results, then you can run MLT handler for both the cores independently and
merge the response thereafter based on your understanding of the underlying
data in the responses.

Cheers
Avlesh

On Wed, Oct 28, 2009 at 5:52 AM, Adamsky, Robert <ra...@techtarget.com>wrote:

>
> Have two cores with some common fields in their schemas.  I want to
> perform a MLT query on one core and get results from the other schema.
> Both cores have same type of id.
>
> I saw this thread:
> http://www.nabble.com/Does-MoreLikeThis-support-sharding--td25378654.html
>
> This is not quite what I am doing as this is for shards against same
> schema.
>
> How is it suggested to perform a MLT query cross core / schema?  Currently,
> I
> only see getting the result from one core and performing a query with the
> common
> fields in the second core and treating those results as MLT results.
>