|
1 | | -h1. Elasticsearch Changes Plugin |
2 | | - |
3 | | -The Elasticsearch Changes plugin is a plugin for "Elasticsearch":http://www.elasticsearch.org/ that tracks changes to indices and makes this information available |
4 | | -through a REST service. It provides information on node basis. So if you want the complete change information you have to query all nodes in your cluster. |
5 | | - |
6 | | -h2. Installation |
7 | | - |
8 | | -Run @bin/plugin -install derryx/elasticsearch-changes-plugin@ |
9 | | - |
10 | | -h2. Configuration |
11 | | - |
12 | | -You can set the length of the history buffer with the setting @changes.history.size@. The default is 100. |
13 | | - |
14 | | -h2. Usage |
15 | | - |
16 | | -Point your browser to @http://localhost:9200/_changes/@ to see changes for all indices. |
17 | | -If you want to see changes only for one or a list of indices you can use @http://localhost:9200/foo,bar,baz/_changes/@. |
18 | | - |
19 | | -You will get a response like this: |
20 | | - |
21 | | -<pre> |
22 | | -{ |
23 | | - "twitter" : { |
24 | | - "lastChange" : 1330372696400, |
25 | | - "changes" : [ { |
26 | | - "type" : "CREATE", |
27 | | - "id" : "qf310jYSSK2OsM0fWEXyIA", |
28 | | - "timestamp" : 1330372680742, |
29 | | - "version" : 1 |
30 | | - }, { |
31 | | - "type" : "INDEX", |
32 | | - "id" : "1", |
33 | | - "timestamp" : 1330372689220, |
34 | | - "version" : 2 |
35 | | - }, { |
36 | | - "type" : "DELETE", |
37 | | - "id" : "1", |
38 | | - "timestamp" : 1330372696400, |
39 | | - "version" : 3 |
40 | | - } ] |
41 | | - }, |
42 | | - "bubu" : { |
43 | | - "lastChange" : 1330369466133, |
44 | | - "changes" : [ ] |
45 | | - } |
46 | | -} |
47 | | -</pre> |
48 | | - |
49 | | -The timestamp is a UNIX timestamp in milliseconds (epoch midnight, January 1, 1970 UTC). |
50 | | - |
51 | | -h3. See changes after a given timestamp |
52 | | - |
53 | | -If you want to see only changes after a given timestamp you can add the parameter @since@ to the request (for example @http://localhost:9200/_changes/?since=1330282941692@ ). The timestamp again is a UNIX timestamp (in milliseconds). |
54 | | - |
55 | | -h3. Wait for a index change to happen |
56 | | - |
57 | | -You can make your request wait for a change to happen with the parameter @wait@. Additionally you can give a @timeout@ parameter (in milliseconds). |
58 | | - (example: @http://localhost:9200/_changes/?wait=true&timeout=60000@ ). The default timeout is 15 minutes. |
59 | | - |
60 | | -h4. Version mapping |
61 | | - |
62 | | -* Change Plugin 0.1.x -> Elasticsearch 0.18.x |
63 | | -* Change Plugin 0.2.x -> Elasticsearch 0.19.x |
64 | | - |
65 | | -h2. Other information |
66 | | - |
| 1 | +h1. Elasticsearch Changes Plugin |
| 2 | + |
| 3 | +The Elasticsearch Changes plugin is a plugin for "Elasticsearch":http://www.elasticsearch.org/ that tracks changes to indices and makes this information available |
| 4 | +through a REST service. It provides information on node basis. So if you want the complete change information you have to query all nodes in your cluster. |
| 5 | + |
| 6 | +h2. Installation |
| 7 | + |
| 8 | +Run @bin/plugin -install derryx/elasticsearch-changes-plugin@ |
| 9 | + |
| 10 | +h2. Configuration |
| 11 | + |
| 12 | +You can set the length of the history buffer with the setting @changes.history.size@. The default is 100. |
| 13 | + |
| 14 | +h2. Usage |
| 15 | + |
| 16 | +Point your browser to @http://localhost:9200/_changes/@ to see changes for all indices. |
| 17 | +If you want to see changes only for one or a list of indices you can use @http://localhost:9200/foo,bar,baz/_changes/@. |
| 18 | + |
| 19 | +You will get a response like this: |
| 20 | + |
| 21 | +<pre> |
| 22 | +{ |
| 23 | + "twitter" : { |
| 24 | + "lastChange" : 1330372696400, |
| 25 | + "changes" : [ { |
| 26 | + "type" : "CREATE", |
| 27 | + "id" : "qf310jYSSK2OsM0fWEXyIA", |
| 28 | + "timestamp" : 1330372680742, |
| 29 | + "version" : 1 |
| 30 | + }, { |
| 31 | + "type" : "INDEX", |
| 32 | + "id" : "1", |
| 33 | + "timestamp" : 1330372689220, |
| 34 | + "version" : 2 |
| 35 | + }, { |
| 36 | + "type" : "DELETE", |
| 37 | + "id" : "1", |
| 38 | + "timestamp" : 1330372696400, |
| 39 | + "version" : 3 |
| 40 | + } ] |
| 41 | + }, |
| 42 | + "bubu" : { |
| 43 | + "lastChange" : 1330369466133, |
| 44 | + "changes" : [ ] |
| 45 | + } |
| 46 | +} |
| 47 | +</pre> |
| 48 | + |
| 49 | +The timestamp is a UNIX timestamp in milliseconds (epoch midnight, January 1, 1970 UTC). |
| 50 | + |
| 51 | +h3. See changes after a given timestamp |
| 52 | + |
| 53 | +If you want to see only changes after a given timestamp you can add the parameter @since@ to the request (for example @http://localhost:9200/_changes/?since=1330282941692@ ). The timestamp again is a UNIX timestamp (in milliseconds). |
| 54 | + |
| 55 | +h3. Wait for a index change to happen |
| 56 | + |
| 57 | +You can make your request wait for a change to happen with the parameter @wait@. Additionally you can give a @timeout@ parameter (in milliseconds). |
| 58 | + (example: @http://localhost:9200/_changes/?wait=true&timeout=60000@ ). The default timeout is 15 minutes. |
| 59 | + |
| 60 | +h4. Version mapping |
| 61 | + |
| 62 | +* Change Plugin 0.1.x -> Elasticsearch 0.18.x |
| 63 | +* Change Plugin 0.2.x -> Elasticsearch 0.19.x |
| 64 | +* Change Plugin 0.3.x -> Elasticsearch 1.0.x |
| 65 | + |
| 66 | +h2. Other information |
| 67 | + |
67 | 68 | See "project's GitHub pages":http://derryx.github.com/elasticsearch-changes-plugin/ for details. |
0 commit comments