Another new user to Solr 4. I admired what Solr can do in full-text search, but the online documentation is a little frustrating. Anyway, I'm working on importing my MySQL database (with several million records) into Solr.
- I downloaded the Java connector and saved it in the
example/lib directory. I created data-config.xml and put in it:
<document name="doc"> <entity name="pagey" query="SELECT * FROM page"> <field column="id" name="pid" /> <field column="Content" name="pcontent" /> <field column="bid" name="bid" /> <field column="Num" name="num" /> </entity> </document>
and saved it in: /example/solr/collection1/conf .
Associated this file with solrconfig.xml , adding:
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">data-config.xml</str> </lst> </requestHandler>
Modified schema.xml to add my new fields.
But when I came to complete the full import via interring: http://[localhost]:8983/solr/dataimport?command=full-import , I got this error: HTTP ERROR 404 Problem accessing /solr/dataimport. Reason: Not Found HTTP ERROR 404 Problem accessing /solr/dataimport. Reason: Not Found . I think this is not more relevant in the latest version 4. Therefore, I tried: http://[localhost]:8983/solr/#/collection1/dataimport?command=full-import , but nothing happens.
My fields have been successfully added, I see them in the admin panel in the browser section of the scheme in collection1.
From admin โ collection1 โ Dataimport, it shows: sorry, no dataimport-handler defined! . Running start.jar does not show errors.
What am I missing right here?
EDIT:. After solving it, remember that "XML is case sensitive."
source share