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 Benjamin Ryan <be...@manchester.ac.uk> on 2013/05/03 08:03:12 UTC

Query across multiple shards - key fields have different names

Hi,
  Sorry for the basic question - I can't get to the WiKi to find the answer.
  Version Solr 3.3.0
  I have two separate indexes (currently in two cores but can be moved to shards)
  One core holds metadata about educational resources, the other usage statistics
  They have a common value  named "id" in one core and "search.resourceid" in the other core.
  How can I construct a shard query (once I have moved one the cores to a different node) so that I can effectively get the statistics for each educational resource grouped by each resource?
  This is an offline reporting job that needs to list the usage events for educational resources over a time period (the usage events have a date/time field.

Regards,
               Ben

------------------------------------------------------------------
Dr Ben Ryan
Jorum Technical Manager

5.12 Roscoe Building
The University of Manchester
Oxford Road
Manchester
M13 9PL
Tel: 0160 275 6039
E-mail: benjamin.ryan@manchester.ac.uk<https://outlook.manchester.ac.uk/owa/redir.aspx?C=b28b5bdd1a91425abf8e32748c93f487&URL=mailto%3abenjamin.ryan%40manchester.ac.uk>
------------------------------------------------------------------


Re: Query across multiple shards - key fields have different names

Posted by Erick Erickson <er...@gmail.com>.
I don't think you can. Problem is that the "pseudo join" capability
can work "cross core", which meas with two separate cores, but last I
knew distributed joins aren't supported which is what you're asking
for.

Really think about flattening your data if at all possible.

Best
Erick

On Thu, May 2, 2013 at 11:03 PM, Benjamin Ryan
<be...@manchester.ac.uk> wrote:
> Hi,
>   Sorry for the basic question - I can't get to the WiKi to find the answer.
>   Version Solr 3.3.0
>   I have two separate indexes (currently in two cores but can be moved to shards)
>   One core holds metadata about educational resources, the other usage statistics
>   They have a common value  named "id" in one core and "search.resourceid" in the other core.
>   How can I construct a shard query (once I have moved one the cores to a different node) so that I can effectively get the statistics for each educational resource grouped by each resource?
>   This is an offline reporting job that needs to list the usage events for educational resources over a time period (the usage events have a date/time field.
>
> Regards,
>                Ben
>
> ------------------------------------------------------------------
> Dr Ben Ryan
> Jorum Technical Manager
>
> 5.12 Roscoe Building
> The University of Manchester
> Oxford Road
> Manchester
> M13 9PL
> Tel: 0160 275 6039
> E-mail: benjamin.ryan@manchester.ac.uk<https://outlook.manchester.ac.uk/owa/redir.aspx?C=b28b5bdd1a91425abf8e32748c93f487&URL=mailto%3abenjamin.ryan%40manchester.ac.uk>
> ------------------------------------------------------------------
>