title: How to use SOLR copyField directive to use for muiple fields
body: <p>I have a rather simple SOLR structure, that hold three different fields:</p>
  
  <p>id, text and tags</p>
  
  <p>in the <code>schema.xml</code> I set the following</p>
  
  <pre><code>&lt;uniqueKey&gt;id&lt;/uniqueKey&gt;
  &lt;defaultSearchField&gt;text&lt;/defaultSearchField&gt;
  &lt;solrQueryParser defaultOperator="AND"/&gt;
  &lt;copyField source="tags" dest="text"/&gt;
  </code></pre>
  
  <p>However, when I search a word that only appears as a tag, then the document is not found. </p>
  
  <p>My question here is: does copyField happen before any analyzer runs (index and query) as described <a href="http://wiki.apache.org/solr/SchemaXml#Copy_Fields" rel="nofollow noreferrer">here</a> or just before the query analyzer?</p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>the analyzer def:</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;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" preserveOriginal="1" /&gt;
          &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /&gt;
          &lt;filter class="solr.LowerCaseFilterFactory" /&gt;              
          &lt;filter class="solr.SnowballPorterFilterFactory" language="German" /&gt;
          &lt;filter class="solr.RemoveDuplicatesTokenFilterFactory"/&gt;
      &lt;/analyzer&gt;
      &lt;analyzer type="query"&gt;
          &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
          &lt;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" preserveOriginal="1" /&gt;
          &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /&gt;
          &lt;filter class="solr.LowerCaseFilterFactory" /&gt;              
          &lt;filter class="solr.SnowballPorterFilterFactory" language="German" /&gt;
          &lt;filter class="solr.RemoveDuplicatesTokenFilterFactory"/&gt;
      &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  </code></pre>
  
  <p>and the field-type definitions (they are pretty much as the default configs):</p>
  
  <pre><code>&lt;fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/&gt;
  &lt;fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/&gt;
  </code></pre>
  
  <p>and last the field definitions:</p>
  
  <pre><code>&lt;fields&gt;
      &lt;field name="id" type="string" indexed="true" stored="true" required="true" /&gt;
      &lt;field name="text" type="text" indexed="true" stored="false" multiValued="true" /&gt;
      &lt;field name="tags" type="text" indexed="false" stored="false" /&gt;
  &lt;/fields&gt;
  &lt;uniqueKey&gt;id&lt;/uniqueKey&gt;
  &lt;defaultSearchField&gt;text&lt;/defaultSearchField&gt;
  &lt;solrQueryParser defaultOperator="AND"/&gt;
  &lt;copyField source="tags" dest="text"/&gt;
  </code></pre>