Giter Site home page Giter Site logo

solr-copy-to's Introduction

Warning Project will be archived as read-only. This project still can be use, But there will be no update until unknown date announcement.

Solr Copy To

Solr copy collection to Solr/MongoDB with Solr API using Golang. This project already using dep as package manager.

Available Source

  • Solr 6.6

Available Target

  • Solr 6.6
  • MongoDB 3.6

Build

Dont forget to dep ensure to getting all vendor

go build

Command

  • Run : Execute Copy Solr collection to Solr/mongodb
PS D:\Go Project\src\raditzlawliet\solr-copy-to> go run main.go run --help
Copy Solr collection to Solr/mongodb

Usage:
  solr-to-mgo run [flags]

Flags:
  -h, --help                   help for run
  -m, --max int                Maximum data to be copied, -1/0 for all (default -1)
  -s, --source string          Source Collection
      --source-cursor string   Solr Source Cursor (default "*")
      --source-host string     Solr Source Full URL (with /solr) (default "http://127.0.0.1:8983/solr/")
  -q, --source-query string    Solr Source Query (default "*:*&sort=id+desc")
      --source-rows int        Solr Source Rows Fetch each Query (default 10000)
  -t, --target string          Target Collection
      --target-commit          Commit after Post (Solr) (default true)
      --target-db string       Database (Mongo)
      --target-host string     Mongo (Mongo) | Solr Source Full URL (with /solr) (default "127.0.0.1")
      --target-pass string     Password Database (Mongo)
      --target-type string     Target Collection Type (default "mongo")
      --target-user string     Username Database (Mongo)

Run without Build

Dont forget to dep ensure to getting all vendor.

Copy from Solr searchLog collection into mongoDB searchLog collection with max data 1m and fetch/insert each 10k data.

go run main.go run -s searchLog -t searchLog --source-host http://192.168.0.230:8983/solr/ --target-host localhost:27017 --target-type mongo --target-db melon --source-rows 10000 -m 1000000

Copy from Solr searchLog collection into Solr searchLog collection with max data 1m and fetch/insert each 10k data, auto commit true.

go run main.go run -s searchLog -t searchLog --source-host http://192.168.0.230:8983/solr/ --target-host http://192.168.0.230:8983/solr/ --target-type solr --source-rows 10000 -m 1000000

solr-copy-to's People

Contributors

raditzlawliet avatar

Watchers

James Cloos avatar  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.