1

I need to import/export some documents collection using filtering by substrings.

I tried:

raven.smuggler out http://localhost:8080/ dump.raven --database=Host1 --matadata-filter=Raven-Entity-Name=SagaUniqueIdentity --transform-file=testsaga.js

and then:

raven.smuggler in http://server8287:8080/ dump.raven --database=Host1 --transform-file=testsaga.js

However nothing changed whether I use --transform-file or not. I event tried non existed file name - still no errors and all data exported.

My testsaga.js file:

function(doc) {
    return null;
}

This transform must exclude everything, but anything were copied. I just need to filter my documents by condition like this:

if(!doc['SagaDocId'].startsWith('TestSaga/')) {
    return null;
}

How it can be achieved?

Dzianis Yafimau
  • 2,034
  • 1
  • 27
  • 38

1 Answers1

0

Note that --transform-file works only with import. Documentation of import/export

Embri
  • 622
  • 3
  • 15