Append data to existing index in elasticsearch

1.3k Views Asked by At

I need to append the list to already existing data, Here it is,

curl -XPUT 'localhost:9200/_river/jdbc/_meta' -d '{
    "type" : "jdbc",
    "jdbc": {
   "driver" : "com.mysql.jdbc.Driver",
        "url" : "jdbc:mysql://localhost:3306/dbname",
        "user" : "username",
        "password" : "password",
        "sql": "select * from table where cat_id=1"
        "poll": "24h",
        "strategy": "simple", 
        "scale": 0, 
        "autocommit": true,
        "bulk_size": 5000,
        "max_bulk_requests": 30,
        "bulk_flush_interval": "5s",
        "fetchsize": 100,
        "max_rows": 200000,
        "max_retries": 3,
        "max_retries_wait": "10s",
        "locale": "in",
        "digesting": true,  
}}

When i import the above query, 1 million records were inserted into my shards, Now i need to execute another import with same index, my SQL query is vary from the above query, But the data and structure will be the same, my Query like

 "sql": "select * from table where module_id>6 AND cat_id != 1"

Above query also return same type data, For example above query has 20000 records, Show how can i append the data with above million records, Index and type will be the same.

how can i append the data?

Thanks in Advance,

0

There are 0 best solutions below