Hi,
I am running elasticsearch 0.20.3 and jdbc river 2.0.2.
My goal is to be able to update my index on a regular basis AND also
manually when I need to. But is it doable if I set up a schedule for the
update ?
For the regular basis update I've done this :
curl -XPUT "localhost:9200/_river/article/_meta" -d "{"""type""" :
"""jdbc""","""jdbc""" : {"""strategy""" : """simple""","""driver""" :
"""com.mysql.jdbc.Driver""","""url""" :
"""jdbc:mysql://mysqlserver:3306/dvpt""","""user""" :
"""root""","""password""" : """dvpt""","""sql""" : """select * from
Article""","""poll""" : """10s"""},"""index""" : {"""index""" :
"""jdbc""","""type""" : """article"""}}"
Now if I go to http://localhost:9200/jdbc/article/_search?pretty I get this
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 840,
"max_score" : 1.0,
"hits" : [ {
"_index" : "jdbc",
"_type" : "article",
"_id" : "yLFEpD_uQLOqTuz1aetkWg",
"_score" : 1.0, "_source" : {"IDarticle":1,"designation":"La marque commercialise","IDuserSSO":1}
}, {
"_index" : "jdbc",
"_type" : "article",
"_id" : "e7EBYW_GQAy--9sqvY8-CA",
"_score" : 1.0, "_source" : {"IDarticle":2,"designation":"Ce composant issu de","IDuserSSO":1}
}, {
"_index" : "jdbc",
"_type" : "article",
"_id" : "QZ5m96PSR72DJYbQusc7XQ",
"_score" : 1.0, "_source" : {"IDarticle":3,"designation":"la production de collage","IDuserSSO":1}
}, {
"_index" : "jdbc",
"_type" : "article",
"_id" : "u6-9DBV7SOmuI0vIh1r8ZQ",
"_score" : 1.0, "_source" : {"IDarticle":2,"designation":"Ce composant issu de","IDuserSSO":1}
}, {
"_index" : "jdbc",
"_type" : "article",
"_id" : "MNiy_xoiTDubO8_95cs7Xg",
"_score" : 1.0, "_source" : {"IDarticle":7,"designation":"excel training","IDuserSSO":1}
}, {
"_index" : "jdbc",
"_type" : "article",
"_id" : "T-YdEBS9QhixgMP9tY2t7A",
"_score" : 1.0, "_source" : {"IDarticle":8,"designation":"added at 9:37","IDuserSSO":1}
}, {
"_index" : "jdbc",
"_type" : "article",
"_id" : "FBMwENQbTiWBTIJCuqLHeg",
"_score" : 1.0, "_source" : {"IDarticle":1,"designation":"La marque commercialise","IDuserSSO":1}
}, {
"_index" : "jdbc",
"_type" : "article",
"_id" : "ZIr-bfOqRQWDGpMyamXuQw",
"_score" : 1.0, "_source" : {"IDarticle":2,"designation":"Ce composant issu de","IDuserSSO":1}
}, {
"_index" : "jdbc",
"_type" : "article",
"_id" : "iZYJBXmnRsqITzBQU8wUIw",
"_score" : 1.0, "_source" : {"IDarticle":2,"designation":"Ce composant issu de","IDuserSSO":1}
}, {
"_index" : "jdbc",
"_type" : "article",
"_id" : "TcC5Va-5RzKIkNhQcxB0xw",
"_score" : 1.0, "_source" : {"IDarticle":6,"designation":"freshly added","IDuserSSO":1}
} ]
}
}
As you can see, I have duplicates in there. IDarticle=2 is there 4 times, IDarticle=1 is there twice... In my table Article, I of course dont have duplicates.
Could you also describe the difference between the strategy simple and
table ? When should I user which one and why ?
Thanks for you help.
--
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.
For more options, visit https://groups.google.com/groups/opt_out.