Is there a way to make an aggregation pipeline create the collection with the
$out operator in Camel?
This does not work:
<setBody><simple>
{$match: { myfield: "myvalue" } } ,
{$group: { _id: "$myfield"}},
{$out : "my_other_collection"}
</simple></setBody>
This works fine, but I have to convert to a java.lang.Object[] and then do
another route to insert the data:
<setBody><simple>
{$match: { myfield: "myvalue" } } ,
{$group: { _id: "$myfield"}}
</simple></setBody>
If I can get the $out operator working in an aggregation pipeline this will
save a round-trip to the server from the mongod engine and greatly increase
performance...
Setup: latest version of Camel, latest version of Mongo, routes are in
Spring DSL XML.
Thanks in advance.
$out operator in Camel?
This does not work:
<setBody><simple>
{$match: { myfield: "myvalue" } } ,
{$group: { _id: "$myfield"}},
{$out : "my_other_collection"}
</simple></setBody>
This works fine, but I have to convert to a java.lang.Object[] and then do
another route to insert the data:
<setBody><simple>
{$match: { myfield: "myvalue" } } ,
{$group: { _id: "$myfield"}}
</simple></setBody>
If I can get the $out operator working in an aggregation pipeline this will
save a round-trip to the server from the mongod engine and greatly increase
performance...
Setup: latest version of Camel, latest version of Mongo, routes are in
Spring DSL XML.
Thanks in advance.