Question: I have an elastic search river setup using the jdbc river plugin, that just does a simple select \* from and indexes that table.

But I would like to be able to trigger the river on demand via the API as well as at a standard time interval, so that I can have it index a document when its inserted into this table.

Anybody know if theres anyway to do this at present? 

i.e. 
`/_river/my_river/_refresh`

Thanks.

Answer: 
I don't see a good way for you to trigger the JDBC River into indexing your specific updated document in real time, and I'm not sure it's meant to be used for that anyways.

Instead of triggering the JDBC river to index your document, why don't you just index the document from the update code?

The JDBC river is a great way to feed in large streams of data, and there is [documentation for maintaining coherency with the polling](https://github.com/jprante/elasticsearch-river-jdbc). but I don't think there is an easy to meet your real time requirement.
alernative would be use logstash with jdbc plugin

<https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html>

1. download logstash
2. install input-jdbc-plugin

example config:

```
    input {
            jdbc {
                    jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521:XE"
                    jdbc_user => "user"
                    jdbc_driver_library => "/home/logstash/lib/ojdbc6.jar"
                    jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
                    statement => "select * from events where update_date > :sql_last_value order by update_date"
                    last_run_metadata_path => "run_metadata_event.log"
                    schedule => "* * * * *"
                    jdbc_password => "password"
            }
    }
    # The filter part of this file is commented out to indicate that it is
    # optional.
    filter {
           mutate {
                   split => { "field_1" => ";"}

           }
    }

    output {
        elasticsearch {
            #protocol => "http"
            hosts => ["localhost:9200"]
            index => "items"
            document_type => "doc_type"
            document_id => "%{doc_id}"
        }
    }

```