title: Excluding words or phrase in solr search
body: <p>I have following solr field configured and wanted to see how can I eliminate some words from search. For e.g fries, fried etc.. I tried putting it in stopwords.txt, but doesn't works solr still returns results.
  Another question I have is.</p>
  
  <p>How can I limit search such that if text contains two words that are close or separate it should return matching results for e.g</p>
  
  <p>If i search for shrimp poboy it should return 1 and 3 and not 2.</p>
  
  <ol>
  <li>I like shrimp poboy</li>
  <li>shrimp vegetable</li>
  <li><p>shrimp sandwich under poboy sandwich category</p>
  
  <pre><code> &lt;fieldType name="text" class="solr.TextField" positionIncrementGap="100"&gt;
    &lt;analyzer type="index"&gt;
  &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
  &lt;!--tokenizer class="solr.KeywordTokenizerFactory"/--&gt;
  &lt;filter class="solr.LowerCaseFilterFactory"/&gt;       
  &lt;filter class="solr.PatternReplaceFilterFactory" pattern="(;|,|-)\s*" replacement=" " replace="all"/&gt;   
  &lt;filter class="solr.PatternReplaceFilterFactory" pattern="^(\p{Punct}*)(.*?)(\p{Punct}*)$" replacement="$2"/&gt;       
  &lt;filter class="solr.WordDelimiterFilterFactory"
          generateWordParts="1"
          generateNumberParts="1"
          catenateWords="1"
          catenateNumbers="1"
          catenateAll="0"
          preserveOriginal="1"
          /&gt;
  &lt;filter class="solr.TrimFilterFactory"/&gt;
          &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/&gt;
     &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms.keyword.txt" ignoreCase="true" expand="true" tokenizerFactory="solr.KeywordTokenizerFactory"/&gt;
         &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/&gt;
         &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
         &lt;filter class="solr.PorterStemFilterFactory"/&gt;
         &lt;filter class="solr.RemoveDuplicatesTokenFilterFactory"/&gt;
      &lt;/analyzer&gt;
  &lt;analyzer type="query"&gt;
  &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
  &lt;!--tokenizer class="solr.KeywordTokenizerFactory"/--&gt;
  &lt;filter class="solr.LowerCaseFilterFactory"/&gt;       
  &lt;filter class="solr.PatternReplaceFilterFactory" pattern="(;|,|-)\s*" replacement=" " replace="all"/&gt;                       
  &lt;filter class="solr.PatternReplaceFilterFactory" pattern="^(\p{Punct}*)(.*?)(\p{Punct}*)$" replacement="$2"/&gt;                   
  &lt;filter class="solr.WordDelimiterFilterFactory"
          generateWordParts="1"
          generateNumberParts="1"
          catenateWords="1"
          catenateNumbers="1"
          catenateAll="0"
          preserveOriginal="1"
          /&gt;      
  &lt;filter class="solr.TrimFilterFactory"/&gt;
          &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/&gt;
  &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms.keyword.txt" ignoreCase="true" expand="true" tokenizerFactory="solr.KeywordTokenizerFactory"/&gt;     
          &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/&gt;
          &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
          &lt;filter class="solr.PorterStemFilterFactory"/&gt;
          &lt;filter class="solr.RemoveDuplicatesTokenFilterFactory"/&gt;
        &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  </code></pre></li>
  </ol>