lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "FAQ" by HossMan
Date Mon, 12 Sep 2011 22:03:13 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "FAQ" page has been changed by HossMan:
http://wiki.apache.org/solr/FAQ?action=diff&rev1=79&rev2=80

Comment:
pure negative sub queries

  {{{
  <solrQueryParser defaultOperator="AND"/>
  }}}
+ 
+ == Why does 'foo AND -baz' match docs, but 'foo AND (-bar)' doesn't ? ==
+ 
+ Boolean queries must have at least one "positive" expression (ie; MUST or SHOULD) in order
to match.  Solr tries to help with this, and if asked to execute a BooleanQuery that does
contains only negatived clauses _at the topmost level_, it adds a match all docs query (ie:
*:*) 
+ 
+ If the top level BoolenQuery contains somewhere inside of it a nested BooleanQuery which
contains only negated clauses, that nested query will not be modified, and it (by definition)
an't match any documents -- if it is required, that means the outer query will not match.
+ 
+ More Detail:
+  * https://issues.apache.org/jira/browse/SOLR-80
+  * https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201006.mbox/%3Calpine.DEB.1.10.1006011609080.29455@radix.cryptio.net%3E
+ 
  == How do I add full-text summaries to my search results? ==
  Basic highlighting/summarization can be added adding `hl=true` to the query parameters.
 More advanced highlighting is described in HighlightingParameters.
  

Mime
View raw message