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" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">data-config.xml</str> </lst> </requestHandler> My data-config.xml <dataConfig> <dataSource type="BinFileDataSource" /> <document> <entity name="f" dataSource="null" rootEntity="false" processor="FileListEntityProcessor" baseDir="C:\Users\aroraarc\Desktop\Impdo" fileName=".*pdf" recursive="true"> <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"/> </entity> </entity> </document> </dataConfig> 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> </searchComponent> 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 <elevate> <query text="foo bar"> <doc id="4602376f-9741-407b-896e-645ec3ead457" /> </query> </elevate> 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? <doc> <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: http://lucene.472066.n3.nabble.com/Removal-of-unique-key-Query-Elevation-Component-tp4074624.html Sent from the Solr - User mailing list archive at Nabble.com.