I want to build a solr search query to search documents with the following criteria: the relation between the properties of same Content type should be AND, and OR between different content types
I tried this query:
fq = {!parent which="+solr_doc_type:d_parent"} (+solr_doc_type:d_child + ( ( current_content_type_id:80 AND (+property_id:331 -item_property_value:16) AND (+property_id:329 +item_property_value:*test*) ) OR ( current_content_type_id:109 AND (+property_id:918 +item_property_value:30052) AND (+property_id:702 +item_property_value:1) ) ) )
and this query also:
fq = current_content_type_id:80 or current_content_type_id:109
fq = {!parent which="+solr_doc_type:d_parent"} (+solr_doc_type:d_child + ( ( (+property_id:331 -item_property_value:16) AND (+property_id:329 +item_property_value:*test*) ) OR ( (+property_id:918 +item_property_value:30052) AND (+property_id:702 +item_property_value:1) ) ) )
but in both cases the result is not correct.
Any suggestion for optimizing the SOLR query?