Git Product home page Git Product logo

dataimporthandler's Introduction

Data Import Handler

An Apache Solr™ package for importing records from database systems into Apache Solr collections.

DIH Build

About

This is a 3rd party package for Apache Solr, aiming at maintaining the Data Import Handler since it will no longer ship with the default Solr download in the future.

The success of this project relies on contributions from the broader community through Pull Requests. See "Issues" sections and help in any way you see fit.

Installing and running

  • Start Solr (version 9.X master) nodes with -Denable.packages=true

    bin/solr -c -Denable.packages=true

  • Add repository:

    bin/solr package add-repo data-import-handler "https://raw.githubusercontent.com/searchscale/dataimporthandler/master/repo/"

  • See available packages:

    bin/solr package list-available

  • Install the package

    bin/solr package install data-import-handler

  • Create a products collection

    curl "http://localhost:8983/solr/admin/collections?action=CREATE&name=products&numShards=1"

  • Deploy package on the collection

    bin/solr package deploy data-import-handler -y -collections products

  • Create the DB configurations file

    Create a new file data-config.xml:

    <dataConfig>
        <dataSource type="JdbcDataSource" driver="org.mariadb.jdbc.Driver" 
                url="jdbc:mysql://localhost/myproducts" user="root" password="password"/>
        <document>
            <entity name="product" query="select ProductID AS id, Name as name_t from products"></entity>
        </document>
    </dataConfig>
    
  • Add the configurations and reload the collection

    ./server/scripts/cloud-scripts/zkcli.sh -z localhost:9983 -cmd putfile "/configs/products.AUTOCREATED/data-config.xml" data-config.xml

    curl "localhost:8983/solr/admin/collections?action=RELOAD&name=products"

  • Run data import

    curl http://localhost:8983/solr/products/dataimport?command=full-import

    curl "http://localhost:8983/solr/products/select?q=*:*"

Contributing

The source code for DIH versions that are compatible with Solr 8.x are in branch_8x branch (branch_9x for Solr 9.x). Please feel free to open issues and/or open pull requests against that branch.

Known Issues

  • Only MariaDB connector supported out-of-the-box right now. The connectors to be used need to be shipped as part of this package, and currently only MariaDB connector is shipped.

  • Solr Admin UI's Dataimport tab could be a bit glitchy when used with this package

Attribution

The code in this repository was originally a fork of the original DIH code in Solr project and the original code is (C) Apache Software Foundation.

Additional work done in this repository is (C) the respective authors and licensed under the Apache License 2.0.

dataimporthandler's People

Contributors

rmuir avatar jdyer1 avatar sarowe avatar uschindler avatar markrmiller avatar shalinmangar avatar noblepaul avatar hossman avatar s1monw avatar jpountz avatar dweiss avatar kojisekig avatar erikhatcher avatar romseygeek avatar yonik avatar mkhludnev avatar janhoy avatar dsmiley avatar rohitbemax avatar mvgsoftware avatar sigram avatar caomanhdat avatar cpoerschke avatar mikemccand avatar rjernst avatar siren avatar github-actions[bot] avatar anshumg avatar gerlowskija avatar vthacker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.