lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From archit2112 <>
Subject Removal of unique key - Query Elevation Component
Date Tue, 02 Jul 2013 08:44:53 GMT

I want to index pdf files in solr 4.3.0 using the data import handler.

I have done the following:

My request handler -

<requestHandler name="/dataimport" 
    <lst name="defaults">  
      <str name="config">data-config.xml</str>  

My data-config.xml

<dataSource type="BinFileDataSource" />  
<entity name="f" dataSource="null" rootEntity="false" 
baseDir="C:\Users\aroraarc\Desktop\Impdo" fileName=".*pdf" 
<entity name="tika-test" processor="TikaEntityProcessor" 
url="${f.fileAbsolutePath}" format="text">  
<field column="Author" name="author" meta="true"/>
<field column="title" name="title" meta="true"/>
<field column="text" name="text"/>

Now when i tried to index the documents i got the following error

org.apache.solr.common.SolrException: Document is missing mandatory
uniqueKey field: id

Because i dont want any uniquekey in my case i disabled it as follows :

In solrconfig.xml i commented out -

<searchComponent name="elevator" class="solr.QueryElevationComponent" >
    pick a fieldType to analyze queries 
    <str name="queryFieldType">string</str>
    <str name="config-file">elevate.xml</str>

In schema.xml i commented out <uniquekey>id</uniquekey>

and added

<fieldType name="uuid" class="solr.UUIDField" indexed="true" /> 
<field name="id" type="uuid" indexed="true" stored="true" default="NEW" />

and in elevate.xml i made the following changes

 <query text="foo bar">
  <doc id="4602376f-9741-407b-896e-645ec3ead457" />

When i do this the indexing takes place but the indexed docs contain an
author,s_author and id field. The document should contain author,text,title
and id field (as defined in my data-config.xml). Please help me out. Am i
doing anything wrong? and from where did this s_author field come?

    <str name="author">arora arc</str>
    <str name="author_s">arora arc</str>
    <str name="id">4f65332d-49d9-497a-b88b-881da618f571</str></doc>

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message