-
Notifications
You must be signed in to change notification settings - Fork 83
Bulk scripting support to RabbitMQ river #18
Conversation
@dadoonet any chance you can merge this so we can point our dependency to the real RabbitMQ River repo instead of our clone? |
I'm on it. I just want to add a testcase and will push it. |
How do you use scripts with a message body as: { "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is a tweet" } }
{ "delete" : { "_index" : "twitter", "_type" : "tweet", "_id" : "2" } }
{ "create" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "another tweet" } } Can you give an example of how you will build it: curl -XPUT 'localhost:9200/_river/my_river/_meta' -d '{
"type" : "rabbitmq",
"rabbitmq" : { },
"script_filter" : {
"script" : "body. ....",
"script_lang" : "mvel"
}
}' Thanks |
Hi David, I have plagiarized your RabbitMQRiverTest, which by the way has a missing closing bracket in line 52, and created a test for the scripting functionality. The format received is not nice, due to bulk header + optional body, but it's possible to parse it, do some stuff, and flatten it again. I have gisted an example (and committed it too) that filters out "create" operations. Let me know if you have any questions or concerns. Thanks, |
Closes #17. Closes elastic#18.
Closes #17. Closes elastic#18.
Well, I am not much of a Thanks for the integration!. |
Regarding to this PR, I feel that we should do something different here than in other rivers. So, we probably need to put your PR under a new Make sense? |
The new name So you plan to add a general option to use scripts with |
Added bulk scripting support to RabbitMQ river:
Have a look at Native (Java) Scripts documentation for how to declare a script.
Relative to #17.