You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Jilani Shaik <ji...@gmail.com> on 2013/06/26 14:57:41 UTC

Get the query result from one collection and send it to other collection to for merging the result sets

Hi,

We will have two categories of data, where one category will be the list of
primary data (for example products) and the other collection (it could be
spread across shards) holds the transaction data (for example product sales
data).



We have search scenario where we need to show the products along with the
number of sales for each product. For this we need to do a facet based
search on second collection and then this has to shown together along with
the primary data.


Is there any way to handle this kind of scenario. Please suggest any other
approaches to get the desired result.


Thank you,
Jilani

Re: Get the query result from one collection and send it to other collection to for merging the result sets

Posted by Jilani Shaik <ji...@gmail.com>.
Hi,

My scenario is similar to the second choice and for that is there any
standard handler in solr, which can take my query and internally it will
pass the query to other collection and at the end merge these two result
docs.

I am looking some feature, where solr is going to do that merge instead of
code out side solr.

Please suggest me

Thank you,
Jilani

On Wed, Jun 26, 2013 at 6:53 PM, Jack Krupansky <ja...@basetechnology.com>wrote:

>   When in doubt... flatten. Actually, in this case, you may simply need
> to store a little more of your product data for each sales document. Then
> you can just query on the sales collection.
>
> Or... just store the product ID/key with each sales transaction and then
> do a second query to get the product data given a list of the product keys
> for the sales items to be displayed.
>
> Your choice.
>
> -- Jack Krupansky
>
>  *From:* Jilani Shaik <ji...@gmail.com>
> *Sent:* Wednesday, June 26, 2013 8:57 AM
> *To:* dev@lucene.apache.org
> *Subject:* Get the query result from one collection and send it to other
> collection to for merging the result sets
>
> Hi,
>
> We will have two categories of data, where one category will be the list
> of primary data (for example products) and the other collection (it could
> be spread across shards) holds the transaction data (for example product
> sales data).
>
>
>
> We have search scenario where we need to show the products along with the
> number of sales for each product. For this we need to do a facet based
> search on second collection and then this has to shown together along with
> the primary data.
>
>
>
> Is there any way to handle this kind of scenario. Please suggest any other
> approaches to get the desired result.
>
>
> Thank you,
> Jilani
>

Re: Get the query result from one collection and send it to other collection to for merging the result sets

Posted by Jack Krupansky <ja...@basetechnology.com>.
When in doubt... flatten. Actually, in this case, you may simply need to store a little more of your product data for each sales document. Then you can just query on the sales collection.

Or... just store the product ID/key with each sales transaction and then do a second query to get the product data given a list of the product keys for the sales items to be displayed.

Your choice.

-- Jack Krupansky

From: Jilani Shaik 
Sent: Wednesday, June 26, 2013 8:57 AM
To: dev@lucene.apache.org 
Subject: Get the query result from one collection and send it to other collection to for merging the result sets

Hi, 
We will have two categories of data, where one category will be the list of primary data (for example products) and the other collection (it could be spread across shards) holds the transaction data (for example product sales data). 



We have search scenario where we need to show the products along with the number of sales for each product. For this we need to do a facet based search on second collection and then this has to shown together along with the primary data.



Is there any way to handle this kind of scenario. Please suggest any other approaches to get the desired result.



Thank you,
Jilani

Get the query result from one collection and send it to other collection to for merging the result sets

Posted by Jilani Shaik <ji...@gmail.com>.
Hi,

We will have two categories of data, where one category will be the list of
primary data (for example products) and the other collection (it could be
spread across shards) holds the transaction data (for example product sales
data).



We have search scenario where we need to show the products along with the
number of sales for each product. For this we need to do a facet based
search on second collection and then this has to shown together along with
the primary data.


Is there any way to handle this kind of scenario. Please suggest any other
approaches to get the desired result.


Thank you,
Jilani