Hi again Yusnel

Just to confirm, I have tested your use case and the query which returns
what you need is this one:

http://localhost:8983/solr/category/select?q={!join from=categoryId
fromIndex=product to=id}*:*&wt=json&indent=true&fq=name:clothes&hl=false

Please, check and let us know if it works for you

Regards

2015-07-12 17:02 GMT+02:00 Antonio David Pérez Morales <
adperezmora...@gmail.com>:

> Hi Yusnel
>
> I think the query is invalid. It should be "q=clothes&fq={!join
> from=type_id to=id fromIndex=products}" or "q=*:*&fq={!join from=type_id
> to=id fromIndex=products}clothes" as long as you are using an edismax
> parser or df param for default field, where "clothes" query is matched to.
>
> Regards
>
>
>
> 2015-07-11 2:23 GMT+02:00 Yusnel Rojas García <yroj...@gmail.com>:
>
>> I have 2 indexes
>>
>> products {
>>    id,
>>    name,
>>    type_id
>>    ..
>> }
>>
>> and
>>
>> categories {
>>    id,
>>    name
>>    ..
>> }
>>
>> and I want to get all categories that match a name and have products in
>> it.
>> my best guess would be:
>>
>> http://localhost:8983/solr/categories/select?q=clothes&fl=*,score&fq={!join
>> from=type_id
>> <http://localhost:8983/solr/categories/select?q=clothes&fl=*,score&fq=%7B!joinfrom=type_id>
>> to=id fromIndex=products}*:*
>>
>> but always get an empty response. help please!
>>
>> Is a better way of doing that without using another index?
>>
>
>

Reply via email to