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 Fiz Newyorker <fi...@gmail.com> on 2018/01/11 23:27:59 UTC
Combine Results with Two different Collections.
Hi Team,
Could you please let me know how to handle the below scenario.
I have Two Collections *Accounts & Content.*
I am trying to search term *"biodata". *
from Accounts Collections I am getting the output *sample : your biodata*
from Content Collections I am getting the output *title : my biodata*
*how to combine these Two results against 2 different collection and
get the results . can you let me know sample solr query to run ? *
Your help is much appreciated.
Thanks
Fiz.
Re: Combine Results with Two different Collections.
Posted by Gus Heck <gu...@gmail.com>.
If you just want docs from both collections in the same results, create an
alias across the 2 collections.
https://lucene.apache.org/solr/guide/6_6/collections-api.html
On Thu, Jan 11, 2018 at 11:12 PM, Suman Saurabh <sa...@gmail.com>
wrote:
> Try using solr streaming api.
> https://lucene.apache.org/solr/guide/6_6/streaming-expressions.html
> Sample query:
> innerJoin(
> select(search(<collection 1 name>, q=<collection 1 query>, fl=<collection 1
> select fields>, sort=<sort criteria>, qt="/export"), <select field name
> with alias >),
> select(search(search(<collection 2 name>, q=<collection 2 query>,
> fl=<collection 2 select fields>, sort=<sort criteria>, qt="/export"),
> <select field name with alias >),
> on=<join field>)
>
> Note : Both collections must have at least one common field to perform the
> joining.
>
> On Fri, Jan 12, 2018 at 4:57 AM, Fiz Newyorker <fi...@gmail.com>
> wrote:
>
> > Hi Team,
> >
> > Could you please let me know how to handle the below scenario.
> >
> > I have Two Collections *Accounts & Content.*
> >
> > I am trying to search term *"biodata". *
> >
> > from Accounts Collections I am getting the output *sample : your
> biodata*
> >
> > from Content Collections I am getting the output *title : my biodata*
> >
> > *how to combine these Two results against 2 different collection and
> > get the results . can you let me know sample solr query to run ? *
> >
> > Your help is much appreciated.
> >
> >
> > Thanks
> > Fiz.
> >
>
>
>
> --
> Thanks and Regards,
> Suman Saurabh
>
--
http://www.the111shift.com
Re: Combine Results with Two different Collections.
Posted by Suman Saurabh <sa...@gmail.com>.
Try using solr streaming api.
https://lucene.apache.org/solr/guide/6_6/streaming-expressions.html
Sample query:
innerJoin(
select(search(<collection 1 name>, q=<collection 1 query>, fl=<collection 1
select fields>, sort=<sort criteria>, qt="/export"), <select field name
with alias >),
select(search(search(<collection 2 name>, q=<collection 2 query>,
fl=<collection 2 select fields>, sort=<sort criteria>, qt="/export"),
<select field name with alias >),
on=<join field>)
Note : Both collections must have at least one common field to perform the
joining.
On Fri, Jan 12, 2018 at 4:57 AM, Fiz Newyorker <fi...@gmail.com> wrote:
> Hi Team,
>
> Could you please let me know how to handle the below scenario.
>
> I have Two Collections *Accounts & Content.*
>
> I am trying to search term *"biodata". *
>
> from Accounts Collections I am getting the output *sample : your biodata*
>
> from Content Collections I am getting the output *title : my biodata*
>
> *how to combine these Two results against 2 different collection and
> get the results . can you let me know sample solr query to run ? *
>
> Your help is much appreciated.
>
>
> Thanks
> Fiz.
>
--
Thanks and Regards,
Suman Saurabh
Re: Combine Results with Two different Collections.
Posted by Fiz Newyorker <fi...@gmail.com>.
Yes Mikhail, even I couldn't find it.
Hi Solr-user team,
Requesting your support.
Thanks
Fiz.
On Thu, Jan 11, 2018 at 8:06 PM, Mikhail Khludnev <mk...@apache.org> wrote:
> I believe it supports collection=accounts,content param, but can't find it
> in documentation.
>
> On Fri, Jan 12, 2018 at 2:27 AM, Fiz Newyorker <fi...@gmail.com>
> wrote:
>
> > Hi Team,
> >
> > Could you please let me know how to handle the below scenario.
> >
> > I have Two Collections *Accounts & Content.*
> >
> > I am trying to search term *"biodata". *
> >
> > from Accounts Collections I am getting the output *sample : your
> biodata*
> >
> > from Content Collections I am getting the output *title : my biodata*
> >
> > *how to combine these Two results against 2 different collection and
> > get the results . can you let me know sample solr query to run ? *
> >
> > Your help is much appreciated.
> >
> >
> > Thanks
> > Fiz.
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>
Re: Combine Results with Two different Collections.
Posted by Mikhail Khludnev <mk...@apache.org>.
I believe it supports collection=accounts,content param, but can't find it
in documentation.
On Fri, Jan 12, 2018 at 2:27 AM, Fiz Newyorker <fi...@gmail.com> wrote:
> Hi Team,
>
> Could you please let me know how to handle the below scenario.
>
> I have Two Collections *Accounts & Content.*
>
> I am trying to search term *"biodata". *
>
> from Accounts Collections I am getting the output *sample : your biodata*
>
> from Content Collections I am getting the output *title : my biodata*
>
> *how to combine these Two results against 2 different collection and
> get the results . can you let me know sample solr query to run ? *
>
> Your help is much appreciated.
>
>
> Thanks
> Fiz.
>
--
Sincerely yours
Mikhail Khludnev