SearchStax Help Center


Boolean Search vs. Stopwords

The SearchStax Site Search solution honors both the Solr stopwords feature and its Boolean query feature. This can sometimes be confusing, so we have prepared some examples here.

  • The examples are from a Crawler demo based on the SearchStax documentation corpus. Stopwords are enabled for this demo.
  • Lowercase and mixed-case and, or, not are interpreted as query keywords. These are treated as stopwords when appropriate.
  • Uppercase AND, OR, NOT are interpreted as Boolean operators.
  • Depending on usage, the hyphen (-) may be ignored or treated as a shorthand for NOT.
  • The plus (+) requires that the following term be present.

In the table below, the Input Query is the user input. The Parsed Query represents how Solr interpreted it.

Input QueryParsed QueryHitsNotes
stopstop17Documents contain “stop”
wordsword16Docs contain “word” (using stemming)
stop wordsstop word30Docs contain either “stop” or “word.” Three contain both.
stop and wordsstop and word30Stopword “and” removed.
stop And wordsstop And word30mixed case “And” is treated as stop word.
stop AND wordsstop AND word3Boolean AND (all capitals). Doc must have both terms.
stop or wordsstop or word30Stopword “or” removed.
stop OR wordsstop OR word30Boolean OR. Same as default search.
stop not wordsstop not word30Stopword “not” removed.
stop NOT wordsstop NOT word14Boolean NOT. “Stop” is present but “word” is not.
stop-wordsstop word30Solr removes the hyphen.
stop -wordsstop NOT word14Hyphen prefix is shorthand for NOT.
“stop-words”“stop word”3Phrase query. “Stop” and “word” must be adjacent and in this order.
+stop words+stop word17Must include “stop.” Will score higher if “word” is present, too.

Questions?

Do not hesitate to contact the SearchStax Support Desk.


Return to Frequently Asked Questions.