title: Issue about Schema.xml uniqueKey field
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3631823/solr-queryelevationcomponent-requires-strfield-uniquekeyfield-error">Solr: QueryElevationComponent requires StrField uniqueKeyField error</a>  </p>
  </blockquote>
  
  
  
  <p>I hava configured the schema.xml with different field like</p>
  
  <pre><code>&lt;fields&gt;
      &lt;field name="id" type="int" indexed="true" stored="true" required="true" /&gt; 
  &lt;/fields&gt;
  &lt;uniqueKey&gt;id&lt;/uniqueKey&gt;
  </code></pre>
  
  <p>when I run solr service it gives me the error like <code>uniquekey field must be string</code> then after I change the field type int to string it's working fine</p>
  
  <pre><code>&lt;fields&gt;
      &lt;field name="id" type="string" indexed="true" stored="true" required="true" /&gt; 
  &lt;/fields&gt;
  &lt;uniqueKey&gt;id&lt;/uniqueKey&gt;
  </code></pre>
  
  <p>but i want to uniquekey in int type.</p>
  
  <blockquote>
    <p>HTTP Status 500 - Severe errors in solr configuration. Check your log
    files for more detailed information on what may be wrong. If you want
    solr to continue after configuration errors, change:
    false in null
    ------------------------------------------------------------- org.apache.solr.common.SolrException: QueryElevationComponent requires
    the schema to have a uniqueKeyField implemented using StrField at
    org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:157)
    at
    org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:508)
    at org.apache.solr.core.SolrCore.(SolrCore.java:588) at
    org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
    at
    org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
    at
    org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
    at
    org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
    at
    org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
    at
    org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)
    at
    org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)
    at
    org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at
    org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at
    org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at
    org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    at
    org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at
    org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
    at
    org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at
    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at
    org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at
    org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at
    org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at
    org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at
    org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
    java.lang.reflect.Method.invoke(Unknown Source) at
    org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at
    org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)</p>
  </blockquote>