Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

I wonder how to add data to the solr's schema #157

Open
ygpark2 opened this issue Dec 30, 2011 · 1 comment
Open

I wonder how to add data to the solr's schema #157

ygpark2 opened this issue Dec 30, 2011 · 1 comment

Comments

@ygpark2
Copy link

ygpark2 commented Dec 30, 2011

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.

@nix4
Copy link

nix4 commented Nov 18, 2012

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants