Open ygpark2 opened 12 years ago
I am looking for a similar solution.
Basically, I am trying to import data in a local database into solandra. So in my data-config.xml I have:
<dataConfig>
<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/posts_db" user="root" password="root"/>
<document>
<entity name="item" query="select * from posts">
<field column="ID" name="id" />
<field column="text" name="text" />
<field column="author_name" name="author_name" />
</entity>
</document>
</dataConfig>
And my solconfig.xml is setup as shown below.
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">/***/tools/solandra/solandra-app/conf/data-config.xml</str>
<lst name="datasource">
<str name="driver">com.mysql.jdbc.Driver</str>
<str name="url">jdbc:mysql://localhost/posts_db</str>
<str name="user">post_usr</str>
<str name="password">***</str>
</lst>
</lst>
</requestHandler>
The solr documentation specifies that you can post data using the url: http://localhost:8983/solr/dataimport?command=delta-import. What is the corresponding URL in solandra? I've tried http://localhost:8983/solandra/dataimport?command=delta-import, but I get 404 error: "Can not find: /solandra/dataimport"
Any help will be appreciated.
Thanks
I try to add new data to the solandra according to the solr's schema but I can't find any example about this.
My ultimate goal is to integrate solandra with django-solr.
What I understand about the insert and updating in the solr based on the original solr and django-solr.is to send the new data on the http protocol to the decent path (eg : http://localhost:8983/solandra/wikipedia/update/json)
However, when I access the url, the browser keep telling me "HTTP ERROR: 404"
Can you help me understand the step to add new data and delete the data in the solandra environment?
I also have a look at the reuters-demo, but the procedure to insert data is process in the file of reutersimporter.jar, but I can't see the source as well.
So Please help me to understand how the system work in terms of data inserting and deleting.
Thank you.