---
title: "QueryElevationComponent requires the schema to have a uniqueKeyField implemented using StrField"
author: "青春的、脚步"
date: "2012-01-14T17:34:00Z"
tags: []
slug: "queryelevationcomponent-requires-the-schema-to-have-a-uniquekeyfield-implemented-using-strfield"
draft: false
lastmod: "2014-01-24T16:52:45Z"
id: 2009191
url: "https://youngstep.iteye.com/blog/2009191"
---

如果你的field id为int 类型

在solrconfig.xml文件中

注释以下结点

```
     <!-- 
    <searchComponent name="elevator" class="solr.QueryElevationComponent" >  
 
      <str name="queryFieldType">string</str>  
      <str name="config-file">elevate.xml</str>  
    </searchComponent>  
       
    <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">  
      <lst name="defaults">  
        <str name="echoParams">explicit</str>  
      </lst>  
      <arr name="last-components">  
        <str>elevator</str>  
      </arr>  
    </requestHandler>  
-->
```