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 marotosg <ma...@gmail.com> on 2017/03/15 14:02:20 UTC
Fetch Data from two collections and filter results
Hi,
I am trying to solve a use case and not fully sure if can be achieved with
new fancy Solr features.
I have two collections People and Jobs. Job collection has the id of the
person in the schema.
1) Is it possible to run a query against person collection and join data
from the job collection?
2) Would it be possible to filter the results retrieved from job collection
and aggregate that data?
For instance let's say there is 1 person with 5 jobs and the job is on
different industries.
Would it be possible to retrieve that person and retrieve from the job
collection the number 3 because the number of jobs for that person on IT is
3.
It would be great if i can do everything in one call.
Thanks a lot guys,
--
View this message in context: http://lucene.472066.n3.nabble.com/Fetch-Data-from-two-collections-and-filter-results-tp4325118.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Fetch Data from two collections and filter results
Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
I'm currently looking at this as well, and from what I know, Solr Streaming
Expressions might be able to achieve this.
https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions#StreamingExpressions-StreamEvaluators
There are functions like innerJoin, leftOuterJoin, etc.
But do note that this only works in Solr 6.x.
Regards,
Edwin
On 15 March 2017 at 22:02, marotosg <ma...@gmail.com> wrote:
> Hi,
>
> I am trying to solve a use case and not fully sure if can be achieved with
> new fancy Solr features.
> I have two collections People and Jobs. Job collection has the id of the
> person in the schema.
>
> 1) Is it possible to run a query against person collection and join data
> from the job collection?
> 2) Would it be possible to filter the results retrieved from job collection
> and aggregate that data?
>
> For instance let's say there is 1 person with 5 jobs and the job is on
> different industries.
> Would it be possible to retrieve that person and retrieve from the job
> collection the number 3 because the number of jobs for that person on IT is
> 3.
>
> It would be great if i can do everything in one call.
>
> Thanks a lot guys,
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/Fetch-Data-from-two-collections-and-filter-
> results-tp4325118.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>