Mailing List Archive

Lucene nested query
Hi guys!


I've a scenario where the lucene query depends on the result of another lucene query.


For example, find all the employees of the department where one of its employee's email address = 'abc@email.com'


SQL would be like:


select * from employee where dept_no in(

select dept_no from employee where email = 'abc@email.com'

)


Please note that employee is a huge data and inner query can result into 5 million rows


Any thoughts how to replicate this scenario using core lucene?


Regards,

Khurram