Questions tagged [elasticsearch-jdbc-river]

The Java Database Connection (JDBC) river allows to fetch data from JDBC sources for indexing into Elasticsearch.

It is implemented as an Elasticsearch plugin.

The relational data is internally transformed into structured JSON objects for the schema-less indexing model in Elasticsearch.

Creating a JDBC river is easy. Install the plugin. Download a JDBC driver jar from your vendor's site (here MySQL) and put the jar into the folder of the plugin $ES_HOME/plugins/river-jdbc. Then issue this simple command:

curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{
    "type" : "jdbc",
    "jdbc" : {
        "url" : "jdbc:mysql://localhost:3306/test",
        "user" : "",
        "password" : "",
        "sql" : "select * from orders",
        "index" : "my_jdbc_index",
        "type" : "my_jdbc_type"
    }
}'

Reference :-

Elasticsearch Jdbc River Quick Start

Elasticsearch JBDC River Parameters

124 questions
2
votes
2 answers

Trying to use jdbc river ElasticSearch plugin for batch processing

I need to write some indexing jobs to run once per day that query our Oracle database tables and index into ElasticSearch. Some tables index first and others next since there are table dependencies. But around that process of indexing, I need to…
Horse Voice
  • 8,138
  • 15
  • 69
  • 120
2
votes
1 answer

Insert into custom index with JDBC River

I'm trying to use ElasticSearch in conjunction with MySQL. JDBC River seemed to be exactly what I wanted, but I can't get my data to insert anywhere other than jdbc/jdbc using: curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{ "type"…
SomeKittens
  • 38,868
  • 19
  • 114
  • 143
2
votes
2 answers

How to add multiple object types to elasticsearch using jdbc river?

I'm using the jdbc river to successfully add one object type, "contacts", to elasticsearch. How can I add another contact type with different fields? I'd like to add "companies" as well. What I have is below. Do I need to do a separate PUT…
Brandon
  • 1,058
  • 1
  • 18
  • 42
2
votes
1 answer

Elasticsearch sync with mysql database using jdbc river

I am trying to synchronize data from my mysql database to an ElasticSearch index. I need to update the data in the index as it changes in the database. I am trying jdbc river plugin. It gives an option to update the index periodically from mysql…
harsh
  • 1,471
  • 13
  • 12
2
votes
1 answer

UnavailableShardsException

I want to index and search mysql database using elasticsearch & I followed this tutorial https://github.com/jprante/elasticsearch-river-jdbc/wiki/Quickstart At first I downloaded elasticsearch and installed river-jdbc in its plugin folder. then…
Puneeth P
  • 155
  • 4
  • 18
2
votes
1 answer

Setting up mapping for a JDBC elasticsearch river

I'm using ES 0.20.6 with the elasticsearch-river-jdbc plugin. I created a river that works using : SQL="SELECT ..." curl -XPUT 'localhost:9200/_river/myindex_river/_meta' -d '{ "type" : "jdbc", "jdbc" : { "driver" :…
Crystark
  • 3,693
  • 5
  • 40
  • 61
2
votes
1 answer

When a river updates data in elastic search, is missing data deleted?

I am using the JDBC river to populate docs in elastic search from Sql Server. I am fetching data using a simple Sql query and have set the polling to 20 mins. Now suppose the river fetches 100 docs the first time it polls sql server. And after 20…
shashi
  • 4,616
  • 9
  • 50
  • 77
2
votes
1 answer

about ElasticSearch jdbc river

In my MySQL: mysql> select * from cc; +----+------+ | id | name | +----+------+ | 1 | aa | | 2 | bb | +----+------+ 2 rows in set (0.00 sec) and elasticsearch jdbc river is: curl -XPUT 'localhost:9201/_river/my_jdbc_river/_meta' -d '{ …
bigfanofcpp
  • 33
  • 1
  • 6
1
vote
0 answers

Postgresql stored procedure integrate with elastic search

I have to index PostgreSQL Stored Procedure which is having million of records. Can someone let me know the process how to do indexing the Stored Procedure into elastic search. Without using parameter I want to download whole data in elastic…
1
vote
1 answer

What is the Best way to sync data from mysql to elastic search

I have ES 2.2 and installed JDBC importer for Elasticsearch elasticsearch-jdbc-2.2.0.0 and have been able to insert data, but not being to update ES with a change in mysql, ie. syncing of mysql with ES. How do i do the sync? I executed the following…
Mike
  • 51
  • 1
  • 6
1
vote
0 answers

Elasticsearch Connector - Microsoft Exchange, SQL

im currently evaluating searchsoftware study work. I think, Elasticsearch is really good and cool, but currently im searching for connectors. Specific Elasticsearch connectors for Microsoft Exchange, SQL etc. My only results were Tools like…
1
vote
1 answer

Elasticsearch Not operator is not working

I have some problems with NOT operator in Elastic search, Here is my query { "query": { "filtered": { "query": { "query_string": { "query": "-et_tax:\"Agriculture\" -et_tax:\"Airports/Ports\"" } } } …
skr07
  • 707
  • 1
  • 10
  • 36
1
vote
1 answer

ElasticSearch JDBC River creates duplicates

I'm trying to use a JDBC river to copy my MySQL database to my ElasticSearch index. This however creates double the amount of documents compared to the count(*) of the MySQL table whenever I start the server. I tested multiple times by emptying the…
Hawiak
  • 553
  • 1
  • 9
  • 32
1
vote
1 answer

Elasticsearch not analyzed not working in sorting

I have added the mappings for not analyzed option in elasticsearch, it is not working when i sort the results, here is my mapping shows when i use http://localhost:9200/_river/jdbc/_search "mappings": { "jdbc": { "dynamic_templates": [ …
skr07
  • 707
  • 1
  • 10
  • 36
1
vote
1 answer

Elasticsearch sorting only by alphabetical not by numeric

I am having problem with sorting in PHP, here is my mapping: { "jdbc": { "mappings": { "jdbc": { "properties": { "admitted_date": { "type": "date", "format": "dateOptionalTime" }, …
skr07
  • 707
  • 1
  • 10
  • 36
1 2
3
8 9