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 Pithon Philippe <pp...@gmail.com> on 2016/08/08 15:47:49 UTC

query problem

Hello,
I have two documents type :
- tickets (type_s:"ticket", customerid_i:10)
- customers (type_s:customer,customerid_i:10,name_s:"FISHER" )

I want a query to find all tickets for name customer FISHER
In document ticket (type_s:"ticket") , I have id customer but not name
customer...

Any ideas ???

Thanks

Re: query problem

Posted by Erick Erickson <er...@gmail.com>.
If at all possible, denormalize the data....

But you can also use Solr's Join capability here, see:
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-JoinQueryParser

Best,
Erick

On Mon, Aug 8, 2016 at 8:47 AM, Pithon Philippe <pp...@gmail.com> wrote:
> Hello,
> I have two documents type :
> - tickets (type_s:"ticket", customerid_i:10)
> - customers (type_s:customer,customerid_i:10,name_s:"FISHER" )
>
> I want a query to find all tickets for name customer FISHER
> In document ticket (type_s:"ticket") , I have id customer but not name
> customer...
>
> Any ideas ???
>
> Thanks