I recently changed the schema of our Solr cluster and now indexing documents in the nested structure. I have indexed restaurant as parent with its dish as child docs. BJQ (Block Join Query) parent query parser is handy to filter out all the parents for the child satisfying a given condition -
{!parent which=doc_type:restaurant}doc_type:dish AND dish_name:burger
So the above query returns all the restaurant having burger as one of the dish. I have a use case where I want to filter out all the restaurant having multiple dishes all at once e.g restaurant selling burger & fries both.
{!parent which=doc_type:restaurant}doc_type:dish AND (dish_name:burger OR dish_name:fries)
above query will return restaurants selling either of burger or fries.
Its seems tedious to filter out restaurants selling both using BJQ. How can I write query to achieve this?