I've been facing an issue and have not been able to come up with a solution so far so any sort of help is greatly appreciated .
The Issue is I want to be able to search for product.
1.There is a is_catalogue:boolean field for a product .
2. We want Solr to return products whose price is equal to and greater than 0 when is_catalogue is true for a product.
3. We want Solr to return products whose price is only greater than 0 and NOT equal to 0 when is_catalogue is false for a product.
4.This needs to be done in the same query to solr.
fulltext keywords unless keywords.blank?
with :taxon_ids, [taxon] unless taxon.blank?
with :product_type_taxons, product_types unless product_types.blank?
# tried doing it like this , but did not have much luck
with(:is_catalogue, true) do
with(:is_catalogue, false) do