Serenity,

there is no field fileNo in your SELECT-Query? you've defined it in
the pk-Attribut of the <entity> Tag, but it's also required in the
Query itself. just to note it: you can skip your <field> definition,
if the query returns the field with exactly the same name as the
solr-schema requires it.

Regards
Stefan

On Tue, May 3, 2011 at 5:38 PM, serenity keningston
<serenity.kenings...@gmail.com> wrote:
> Hello Friends,
>
>
> I am new to Solr and experiencing issue while trying to use
> DataImportHandler. I added the required fields to schema.xml file and here
> is my data-config.xml file :
>
> <dataConfig>
>  <dataSource driver="com.mysql.jdbc.Driver"
>    url="jdbc:mysql://localhost:3306/mp3"
>   user="root"
>   password="root" />
>  <document>
>    <entity name="file" pk="fileNo" query="select fname, lname, file from
> mp3.file">
>     <field column="fileNo" name="id"/>
>     <field column="fname" name="fname" />
>     <field column="lname" name="lname" />
>     <field column="file" name="file" />
>    </entity>
>  </document>
> </dataConfig>
>
> I am getting the following errors :
>
> org.apache.solr.common.SolrException: Document [null] missing required
> field: id
>
> solr home defaulted to 'solr/' (could not find system property or JNDI)
> May 3, 2011 9:59:08 AM org.apache.solr.core.SolrResourceLoader <init>
> INFO: Solr home set to 'solr/'
>
> DataImportHandler can extract the information from the database and it is
> displayed in log file, however, it is not indexing the data. Can anyone
> please let me know, where I am commiting mistake ?
>
> Regards,
> Serenity
>

Reply via email to