We have the facility of applying stop words for Field Type text during Query
analyzer in schema.xml as shown below :

<fieldtype name="text" class="solr.TextField" positionIncrementGap="100">
            <analyzer type="index">
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                <!-- in this example, we will only use synonyms at query
time
                <filter class="solr.SynonymFilterFactory"
synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
                -->
                <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
                <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0"/>
                <filter class="solr.LowerCaseFilterFactory"/>
                <filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
                <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
            </analyzer>
            <analyzer type="query">
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                <filter class="solr.SynonymFilterFactory"
synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
                <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
                <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0"/>
                <filter class="solr.LowerCaseFilterFactory"/>
                <filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
                <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
            </analyzer>
        </fieldtype>


Question : Is it possible to do the same for String type or not, since the
XML result we are getting while doing a search on admin is showing the
contents of String type as follows , 

Examle : I searched Salman Rushdie on my Solr Admin , the XML result i
recieved  was as shown below :

<?xml version="1.0" encoding="UTF-8" ?> 
- <response>
- <lst name="responseHeader">
  <int name="status">0</int> 
  <int name="QTime">16</int> 
- <lst name="params">
  <str name="rows">10</str> 
  <str name="start">0</str> 
  <str name="indent">on</str> 
  <str name="q">salman</str> 
  <str name="version">2.2</str> 
  </lst>
  </lst>
- <result name="response" numFound="1" start="0">
- <doc>
  <str name="Index_Type_s">productIndex</str> 
  <str name="URL_s">6000</str> 
- <arr name="all">
  <str>productIndex</str> 
  <str>999</str> 
  <str>Salman Rushdie</str> 
  <str>Harper Lee</str> 
  <str>Gurcharan Das</str> 
  <str>Jules Verne</str> 
  <str>these</str> 
  <str>Salman Rushdie</str> 
  <str>Harper Lee</str> 
  <str>Gurcharan Das</str> 
  <str>Jules Verne</str> 
  <str>6000</str> 
  <str>6000</str> 
  <str>http://sapient1.com</str> 
  <str>in Stock</str> 
  <str>499</str> 
  <str>Description No 1 Description No 1 Description No 1 Description No 1
Description No 1</str> 
  </arr>
  <str name="basePrice_s">999</str> 
- <arr name="listOf_author">
  <str>Salman Rushdie</str> 
  <str>Harper Lee</str> 
  <str>Gurcharan Das</str> 
  <str>Jules Verne</str> 
  </arr>
- <arr name="listOf_contributor">
  <str>Salman Rushdie</str> 
  <str>Harper Lee</str> 
  <str>Gurcharan Das</str> 
  <str>Jules Verne</str> 
  </arr>
  <str name="prdMainTitle_s">these</str> 
  <str name="productDescription_s">Description No 1 Description No 1
Description No 1 Description No 1 Description No 1</str> 
  <str name="productPrice_s">499</str> 
  <str name="productURL_s">http://sapient1.com</str> 
  <str name="statusName_s">in Stock</str> 
  </doc>
  </result>
  </response>

Please explain the steps to apply stop words for string type if possible.

-- 
View this message in context: 
http://www.nabble.com/Applying-Stop-words-for-Field-Type-String-tp19722176p19722176.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to