How to do "housekeeping"

Hey folks,

i use elasticsearch to index my derby Database and so use the river-jdbc plugin. Now i have a few questions:

  • How can i refresh my index manually, after i changed some data in my db? For test purposes i set the poll time to 30s but in production i want to be able to refresh the index whenever i want. Oh and please tell me the REST REQUEST, i found a lot of descriptions like : "Call _refresh" which is not very helpful because every Rest request containing "_refresh" was not accepted.

  • When i delete data, the index will be updated after 30 seconds (as specified) BUT i still find all objects. In this forum some other people had the problem and again everybody said "use housekeeping". Ok nice, but how? Can anybody tell me the REST Request in detail which i have to call?

Thanks for any help in advance and greetings
Thomas

Ok i got it, i have to change my SQL statement and name my id column as _id:

"sql" : "select id as "_id", name, firstname from Person"

Actually that also didn´t work correctly. If i delete all my Persons from the db, ElasticSearch only recognizes that 500 Persons have been deleted. WTF??? Why 500?

After playing around with Elasticsearch i´m shortly before to reject this technology. The documentation, especially for the jdbc plugin is very bad, you will find only a few (and often bad or wrong) examples, and simple use cases like partly updating your index seems not to be possible or only with a huge effort.