You can try
qf=my_array&q=+(2 4) +([* TO 1] [3 TO 3] [5 TO *])
This translates to
- my_array shall contain 2 or 4
- my_array shall contain a value x, with x < 2, x between 3 and 3, x > 4
I know that the between 3 and 3
is a bit strange, but that is due to the example.
The caveat of this is that you need to calculate the query on the client side to get the range clauses right. Although the logic to compute this is not too hard.
I have tried this with eDisMax, which is configured like this
<requestHandler name="standard" class="solr.StandardRequestHandler">
<lst name="defaults">
<str name="defType">edismax</str>
<str name="fl">*,score</str>
<str name="mm">1</str>
</lst>
</requestHandler>
<queryParser name="edismax"
class="org.apache.solr.search.ExtendedDismaxQParserPlugin" />