The last option to solve this for me was to ask StackOverflow.
I am trying to create a Solr query to get documents that have a specific value on one of its fields OR tha
(-name:[* TO *] AND *:*) OR name:john
try the below query -
q=(name:john OR -(name:[* TO *]))
You can also use it like this.
&fq=name:john OR !name:['' TO *]