<commit_before>= Mongolastic
:version: v1.4.3

image:https://travis-ci.org/ozlerhakan/mongolastic.svg?branch=master["Build Status", link="https://travis-ci.org/ozlerhakan/mongolastic"]
image:https://api.codacy.com/project/badge/Grade/8d768c2fc37246019115e4d090a33b98["Codacy code quality", link="https://www.codacy.com/app/ozlerhakan/mongolastic?utm_source=github.com&utm_medium=referral&utm_content=ozlerhakan/mongolastic&utm_campaign=Badge_Grade"]
image:https://img.shields.io/docker/pulls/ozlerhakan/mongolastic.svg["Docker Pulls,link="https://hub.docker.com/r/ozlerhakan/mongolastic"]
image:https://img.shields.io/github/release/ozlerhakan/mongolastic.svg[]
image:https://img.shields.io/badge/mongo.java.driver-3.4.2-brightgreen.svg[] image:https://img.shields.io/badge/elastic.java.driver-6.1.1-brightgreen.svg[]
image:https://img.shields.io/badge/license-MIT-blue.svg[]

Mongolastic enables you to migrate your datasets from a mongod node to an elasticsearch node and vice versa. Since mongo and elastic servers can run with different characteristics, the tool provides several optional and required features to ably connect them. Mongolastic works with a yaml or json configuration file to begin a migration process. It reads your demand on the file and start syncing data in the specified direction.

== How it works

First, you can either pull the corresponding image of the app from https://hub.docker.com/r/ozlerhakan/mongolastic/[Docker Hub]

Supported tags and respective Dockerfile links:

*  `_1.4_`, `_1.4.3_`, `_latest_` https://github.com/ozlerhakan/mongolastic/blob/master/Dockerfile[_(master/Dockerfile)_]
*  `_1.4.2_` https://github.com/ozlerhakan/mongolastic/blob/d589cf7375e4a53445de12c201fc8852422e2fae/Dockerfile[_(1.4.2/Dockerfile)_]


or download the latest https://github.com/ozlerhakan/mongolastic/releases/download/{version}/mongolastic.jar[mongolastic.jar] file.

Second, create a yaml or json file which must contain the following structure:

[source,yaml]
----
misc:
    dindex:
        name: <string>      <1>
        as: <string>        <2>
    ctype:
        name: <string>      <3>
        as: <string>        <4>
    direction: (em | me)    <5>
    batch: <number>         <6>
    dropDataset: <bool>     <7>
mongo:
    host: <ip-address>      <8>
    port: <number>          <9>
    query: "mongo-query"    <10>
    project: "projection"   <11><commit_msg>update readme for 1.4.4<commit_after>= Mongolastic
:version: v1.4.3

image:https://travis-ci.org/ozlerhakan/mongolastic.svg?branch=master["Build Status", link="https://travis-ci.org/ozlerhakan/mongolastic"]
image:https://api.codacy.com/project/badge/Grade/8d768c2fc37246019115e4d090a33b98["Codacy code quality", link="https://www.codacy.com/app/ozlerhakan/mongolastic?utm_source=github.com&utm_medium=referral&utm_content=ozlerhakan/mongolastic&utm_campaign=Badge_Grade"]
image:https://img.shields.io/docker/pulls/ozlerhakan/mongolastic.svg["Docker Pulls,link="https://hub.docker.com/r/ozlerhakan/mongolastic"]
image:https://img.shields.io/github/release/ozlerhakan/mongolastic.svg[]
image:https://img.shields.io/badge/mongo.java.driver-3.4.2-brightgreen.svg[] image:https://img.shields.io/badge/elastic.java.driver-6.2.4-brightgreen.svg[]
image:https://img.shields.io/badge/license-MIT-blue.svg[]

Mongolastic enables you to migrate your datasets from a mongod node to an elasticsearch node and vice versa. Since mongo and elastic servers can run with different characteristics, the tool provides several optional and required features to ably connect them. Mongolastic works with a yaml or json configuration file to begin a migration process. It reads your demand on the file and start syncing data in the specified direction.

== How it works

First, you can either pull the corresponding image of the app from https://hub.docker.com/r/ozlerhakan/mongolastic/[Docker Hub]

Supported tags and respective Dockerfile links:

*  `_1.4_`, `_1.4.4_`, `_latest_` https://github.com/ozlerhakan/mongolastic/blob/master/Dockerfile[_(master/Dockerfile)_]
*  `_1.4.3_` https://github.com/ozlerhakan/mongolastic/blob/0dacd80cbdf7b5b7b282bf6dd89ede8558021577/Dockerfile[_(1.4.2/Dockerfile)_]


or download the latest https://github.com/ozlerhakan/mongolastic/releases/download/{version}/mongolastic.jar[mongolastic.jar] file.

Second, create a yaml or json file which must contain the following structure:

[source,yaml]
----
misc:
    dindex:
        name: <string>      <1>
        as: <string>        <2>
    ctype:
        name: <string>      <3>
        as: <string>        <4>
    direction: (em | me)    <5>
    batch: <number>         <6>
    dropDataset: <bool>     <7>
mongo:
    host: <ip-address>      <8>
    port: <number>          <9>
    query: "mongo-query"    <10>
    project: "projection"   <11>
{'fraction_non_alphanumeric': 0.13, 'fraction_numerical': 0.034375, 'mean_word_length': 4.162365591397849, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 28, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5670736', 'n_tokens_mistral': 1786, 'n_tokens_neox': 1662, 'n_words': 348}