Help with JDBC importer for Elasticsearch - can't install it

Hi, I want to use jdbc importer to use elastic search on postgresql, but I didn't understand how to install it. I'm having problems with the last 2 steps:

  • modify script in the bin directory to your needs (Elasticsearch cluster address)

  • run script with a command that starts org.xbib.tools.JDBCImporter with the lib directory on the classpath

I don't know what script the guide is talking about on the last 2 steps, can someone help me? I mean there are loads of scripts inside the bin directory and it doesn't seem obvious to me which one the guide is talking about. Thank you!

You can refer to the scripts in the bin directory. They are similar to each other.I suggest that you read some about the linux shell programming, which will help you understand it.

Maybe you use Windows.

I do not know Windows at all so there is tiny information about the OS level setup. For Linux/Mac/Solaris OS, shell script setup is a common feature and daily work for admins.

There are some smarter people than me who can describe "Powershell" setup for JDBC importer http://r2d2.cc/2015/08/05/elastic-search-on-windows-with-mysql-sql-server-2014-and-import-feeder/

I got it working, thanks. However, I'm still struggling because I need to
update elasticsearch everytime I modify a record or insert a new record on
postgresql. I can't figure out how to do it, I'm already using the schedule
parameter for polling but it just gets all the records every time not just
new ones or modified ones, which is what I need after the first run. I
think I need to use "statefile.json" somehow to do it, but I can't figure
out how. Would you mind giving me an example or two of how to use the file
to accomplish what I need? Thank you.

Hi,
I am new here and I am starting developing on ES but I think your can update you index/indices in 2 ways:

  • from your web application when a new record is added you can use elasticsearch.js library and the ES API as you can check here in order to add typed JSON document.
  • using your scheduled job/batch, depends on how you created it. I tried using a PowerShell batch loading a json file with a query selecting only new records (depends if your db has some way to track new records like flags or datetime of insert) and it worked perfectly.

It's all in the documentation at

and