FAQ

On Sat, Jul 6, 2013 at 2:22 PM, mihaela olteanu wrote:
Hello,

I have 3 indices that form a hierarchy. Basically these were constructed from 3 tables: parent, child1 and child2 and between parent and children there is a one to many relationship.
parent (id,name)

child1(id,join_key,field1)

child2(id,join_key,field2)


"join_key" is the foreign key in each of the child tables

I would like to perform searches like the following: "give me the parents whose name is x or whose child1.field1 is y or child2.field2 is z".

I tried with a query like the following:
#first attempt
/parent/select?q=(name:x) OR ({!join from=join_key to=id fromIndex=child1}field1:y) OR ({!join from=join_key to=id fromIndex=child2}field2:z)

but it didn't work.
Any idea why?

Try adding debugQuery=true to see if the query is parsed correctly.
Try executing a single join alone, like
q={!join from=join_key to=id fromIndex=child1}field1:y
to see if the results are as expected.

-Yonik
http://lucidworks.com

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 5 | next ›
Discussion Overview
groupsolr-user @
categorieslucene
postedJul 6, '13 at 6:22p
activeJul 8, '13 at 12:58p
posts5
users3
websitelucene.apache.org...

People

Translate

site design / logo © 2021 Grokbase