title: Solr query for items with field:value or no value for field at all
body: <p>I'm trying to query Solr for entries that either have a certain value in a field OR no value for the field. The negated field value works when used by itself but causes the query to return no results when combined with anything else. Below is a response with debugQuery enabled. The config file I use can be found <a href="http://drupalcode.org/viewvc/drupal/contributions/modules/apachesolr/solrconfig.xml?view=markup&amp;pathrev=DRUPAL-6--2" rel="noreferrer">here</a>.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;response&gt;
    &lt;responseHeader&gt;
      &lt;status&gt;0&lt;/status&gt;
      &lt;QTime&gt;3&lt;/QTime&gt;
      &lt;lst name="params"&gt;
        &lt;str name="facet"&gt;true&lt;/str&gt;
        &lt;str name="sort"&gt;sort_title asc&lt;/str&gt;
        &lt;str name="fl"&gt;id,nid,url,uid&lt;/str&gt;
        &lt;str name="debugQuery"&gt;true&lt;/str&gt;
        &lt;str name="facet.mincount"&gt;1&lt;/str&gt;
        &lt;str name="facet.sort"&gt;true&lt;/str&gt;
        &lt;str name="start"&gt;0&lt;/str&gt;
        &lt;str name="bf"&gt;recip(rord(created),4.000000,239,239)^200.000000&lt;/str&gt;
        &lt;arr name="fq"&gt;
          &lt;str&gt;NOT type:article&lt;/str&gt;
          &lt;str&gt;NOT type:insect&lt;/str&gt;
          &lt;str&gt;NOT type:news&lt;/str&gt;
          &lt;str&gt;NOT type:plant&lt;/str&gt;
          &lt;str&gt;im_cck_field_affected_plants:(20 OR -[* TO *])&lt;/str&gt;
          &lt;str&gt;entity:node&lt;/str&gt;
        &lt;/arr&gt;
        &lt;str name="version"&gt;1.2&lt;/str&gt;
        &lt;str name="rows"&gt;16&lt;/str&gt;
      &lt;/lst&gt;
    &lt;/responseHeader&gt;
    &lt;result name="response" numFound="0" start="0"/&gt;
    &lt;lst name="facet_counts"&gt;
      &lt;lst name="facet_queries"/&gt;
      &lt;lst name="facet_fields"/&gt;
      &lt;lst name="facet_dates"/&gt;
    &lt;/lst&gt;
    &lt;lst name="debug"&gt;
      &lt;null name="rawquerystring"/&gt;
      &lt;null name="querystring"/&gt;
      &lt;str name="parsedquery"&gt;+MatchAllDocsQuery(*:*) FunctionQuery((239.0/(4.0*float(top(rord(created)))+239.0))^200.0)&lt;/str&gt;
      &lt;str name="parsedquery_toString"&gt;+*:* (239.0/(4.0*float(top(rord(created)))+239.0))^200.0&lt;/str&gt;
      &lt;lst name="explain"/&gt;
      &lt;str name="QParser"&gt;DisMaxQParser&lt;/str&gt;
      &lt;str name="altquerystring"&gt;org.apache.lucene.search.MatchAllDocsQuery:*:*&lt;/str&gt;
      &lt;arr name="boostfuncs"&gt;
        &lt;str&gt;recip(rord(created),4.000000,239,239)^200.000000&lt;/str&gt;
      &lt;/arr&gt;
      &lt;arr name="filter_queries"&gt;
        &lt;str&gt;NOT type:article&lt;/str&gt;
        &lt;str&gt;NOT type:insect&lt;/str&gt;
        &lt;str&gt;NOT type:news&lt;/str&gt;
        &lt;str&gt;NOT type:plant&lt;/str&gt;
        &lt;str&gt;im_cck_field_affected_plants:(20 OR -[* TO *])&lt;/str&gt;
        &lt;str&gt;entity:node&lt;/str&gt;
      &lt;/arr&gt;
      &lt;arr name="parsed_filter_queries"&gt;
        &lt;str&gt;-type:article&lt;/str&gt;
        &lt;str&gt;-type:insect&lt;/str&gt;
        &lt;str&gt;-type:news&lt;/str&gt;
        &lt;str&gt;-type:plant&lt;/str&gt;
        &lt;str&gt;im_cck_field_affected_plants:20 -im_cck_field_affected_plants:[* TO *]&lt;/str&gt;
        &lt;str&gt;entity:node&lt;/str&gt;
      &lt;/arr&gt;
      &lt;lst name="timing"&gt;
        &lt;double name="time"&gt;3.0&lt;/double&gt;
        &lt;lst name="prepare"&gt;
          &lt;double name="time"&gt;3.0&lt;/double&gt;
          &lt;lst name="org.apache.solr.handler.component.QueryComponent"&gt;
            &lt;double name="time"&gt;2.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.FacetComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.MoreLikeThisComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.HighlightComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.StatsComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.SpellCheckComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.DebugComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
        &lt;/lst&gt;
        &lt;lst name="process"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;lst name="org.apache.solr.handler.component.QueryComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.FacetComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.MoreLikeThisComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.HighlightComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.StatsComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.SpellCheckComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
          &lt;lst name="org.apache.solr.handler.component.DebugComponent"&gt;
            &lt;double name="time"&gt;0.0&lt;/double&gt;
          &lt;/lst&gt;
        &lt;/lst&gt;
      &lt;/lst&gt;
    &lt;/lst&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>Any help would be appreciated.</p>