Hello!
Which index you want to update and what you mean by update?
Do you want to change river configuration, for example change the SQL statement? Just delete the river and create it once again and it will do the job.
--
Regards,
Rafał Kuć
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/
Hello!
Can we directly update index without deleting it?
On Saturday, March 28, 2015 at 2:12:08 PM UTC+5, Rafał Kuć wrote:
Hello!
The command you show is creating the river (https://github.com/jprante/elasticsearch-river-jdbc ), not the 'updateauto' index itself. When the river starts running it will create the 'updateauto' index.
I'm not sure what you mean by 'refresh my elasticsearch', but I assume you would like to delete the already created index called 'updateauto' and change the river configuration. If so try the following set of commands:
curl -XDELETE 'localhost:9200/_river/my_update_river' <- it will delete the river resulting in stopping it
curl -XDELETE 'localhost:9200/updateauto' <- this will delete the updateauto index
curl -XPOST 'localhost:9200/_river/my_update_river/_meta' -d '
{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:mysql://localhost:3306/admin",
"user" : "root",
"password" : "",
"poll" : "6s",
"index" : "updateauto",
"type" : "users",
"schedule":"0/10 * * ? * *",
"strategy" : "simple",
"sql" : "select * from users"
}
}'
Of course, the last command should be updated to match your needs before sending it.
--
Regards,
Rafał Kuć
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/
I just want to refresh my elasticsearch and update my sql command. But when i post this code/query again it gives me error that index name "updateauto" already created and it gives my "created" : "false".
On Saturday, March 28, 2015 at 1:54:27 PM UTC+5, Abdul Rafay wrote:
localhost:9200/_river/my_update_river/_meta
{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:mysql://localhost:3306/admin",
"user" : "root",
"password" : "",
"poll" : "6s",
"index" : "updateauto",
"type" : "users",
"schedule":"0/10 * * ? * *",
"strategy" : "simple",
"sql" : "select * from users"
}
}
Here's my code and when i delete index it works for only 10seconds and when i refresh again it automatically created the index.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/275ee522-d6f2-4f44-8043-fcd1d10cb8de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/24b53ed7-6ec1-47da-b561-bdce00cf1390%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.