With the data-config file filled out, I am receiving errors telling me that the 
indexing of my database has failed. I think I have filled out everything I need 
to in the data-config file and that I have everything in the right directory. 
My details are described below, including locations of files, contents of the 
data-config file, and the errors I am seeing. Has anyone else seen problems 
like this? 

As of right now, I have data-config.xml in 
/usr/local/tomcat6.0.20/webapps/solr/, and I have the database bell_labs.sql in 
the solr/home directory /usr/local/tomcat6.0.20/solr/. 

Data-config.xml has the following contents:
<dataConfig>
<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" 
url="jdbc:mysql://localhost/bell_labs" user="root" password="********"/>
    <document name="bell_labs">
        <entity name="employees" query="select InternalEID, Pref, Name, 
FirstName, CSL, Email, cilLogin from employees">
            <field column="InternalEID" name="InternalEID" />
            <field column="Pref" name="Pref" />
            <field column="Name" name="Name" />
            <field column="FirstName" name="FirstName" />
            <field column="CSL" name="CSL" />
            <field column="Email" name="Email" />
            <field column="cilLogin" name="cilLogin" />
        </entity>
    </document>
</dataConfig>

When I go to http://localhost:8080/solr/dataimport, I see the following 
displayed to my browser:
This XML file does not appear to have any style information associated with it. 
The document tree is shown below.
      
−
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
</lst>
−
<lst name="initArgs">
−
<lst name="defaults">
−
<str name="config">
/usr/local/tomcat6.0.20/webapps/solr/data-config.xml
</str>
</lst>
</lst>
<str name="status">idle</str>
<str name="importResponse"/>
−
<lst name="statusMessages">
<str name="Time Elapsed">0:0:35.614</str>
<str name="Total Requests made to DataSource">0</str>
<str name="Total Rows Fetched">0</str>
<str name="Total Documents Processed">0</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2009-06-23 09:24:15</str>
<str name="">Indexing failed. Rolled back all changes.</str>
<str name="Rolledback">2009-06-23 09:24:15</str>
</lst>
−
<str name="WARNING">
This response format is experimental.  It is likely to change in the future.
</str>
</response>

When I go to http://localhost:8080/solr/admin/dataimport.jsp, I see two frames, 
the left frame having the DataImportHandler Development Console, and the right 
frame displaying the following:
This XML file does not appear to have any style information associated with it. 
The document tree is shown below.
      
−
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">24</int>
</lst>
−
<lst name="initArgs">
−
<lst name="defaults">
−
<str name="config">
/usr/local/tomcat6.0.20/webapps/solr/data-config.xml
</str>
</lst>
</lst>
<str name="command">full-import</str>
<str name="mode">debug</str>
<null name="documents"/>
<str name="status">idle</str>
<str name="importResponse">Configuration Re-loaded sucessfully</str>
−
<lst name="statusMessages">
<str name="Time Elapsed">0:0:0.19</str>
<str name="Total Requests made to DataSource">0</str>
<str name="Total Rows Fetched">0</str>
<str name="Total Documents Processed">0</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2009-06-23 09:26:15</str>
<str name="">Indexing failed. Rolled back all changes.</str>
<str name="Rolledback">2009-06-23 09:26:15</str>
</lst>
−
<str name="WARNING">
This response format is experimental.  It is likely to change in the future.
</str>
</response>


-----Original Message-----
From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Monday, June 22, 2009 1:55 PM
To: solr-user@lucene.apache.org
Subject: Re: Data Import Handler

On Mon, Jun 22, 2009 at 10:51 PM, Mukerjee, Neiloy (Neil) <
neil.muker...@alcatel-lucent.com> wrote:

>
> I suspect that the fact that the data-config file is blank is causing these
> issues, but per the documentation on the website, there is no indication of
> what, if anything, should go there - is there an alternate resource that
> anyone knows of which I could use?
>
>
The data-config.xml is the file which specified how and from where Solr can
pull data.

For example look at the full-import from a database data-config.xml at
http://wiki.apache.org/solr/DataImportHandler#head-c24dc86472fa50f3e87f744d3c80ebd9c31b791c

Or, look at the Slashdot feed example at
http://wiki.apache.org/solr/DataImportHandler#head-e68aa93c9ca7b8d261cede2bf1d6110ab1725476
-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to