solr-copy-to

command module
v0.0.0-...-3001e04 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL