<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 16px; font-family: Calibri, sans-serif;">
<div style="color: rgb(0, 0, 0);">
<div>Hi Prasanth,</div>
<div><br>
</div>
<div>Try making that cts:directory-query an xml representation.</div>
<div>Like this:</div>
<div>-query-filter&nbsp;<span style="color: rgb(0, 128, 0); font-family: Incolsolata, Consolas, monospace; font-size: 14px; line-height: 1.4; white-space: pre-wrap; widows: 1; background-color: rgb(242, 246, 248);">&lt;</span><span class="element-name" title="cts:directory-query (http://marklogic.com/cts)" style="color: rgb(0, 128, 0); font-family: Incolsolata, Consolas, monospace; font-size: 14px; line-height: 1.4; white-space: pre-wrap; widows: 1; margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; cursor: pointer;"><span class="namespace-prefix" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline;">cts</span>:<span class="local-name" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline;">directory-query</span></span><span class="element-meta" style="color: rgb(0, 128, 0); font-family: Incolsolata, Consolas, monospace; font-size: 14px; line-height: 1.4; white-space: pre-wrap; widows: 1; margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline;">
<span class="attribute" title="depth ()" data-attribute-name="depth" data-attribute-localname="depth" data-attribute-prefixdata-attribute-namespace-uridata-attribute-value="infinity" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; color: blue;">
<span class="attribute-name" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; cursor: pointer;"><span class="local-name" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline;">depth</span></span>=&quot;<span class="attribute-value" style="margin: 0.2em 0px 0px; padding: 0px 0.2em; border: 0px; outline: 0px; vertical-align: baseline; display: inline-block; line-height: 1; border-bottom-left-radius: 0.5em; border-bottom-right-radius: 0.5em; cursor: text; color: rgb(165, 42, 42); background-position: initial initial; background-repeat: initial initial;">infinity</span>&quot;</span>
<span class="namespace" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; color: rgb(102, 102, 102);">
<span class="xmlns" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline;">xmlns</span>:<span class="namespace-prefix" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline;">cts</span>=&quot;<span class="namespace-uri" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline;">http://marklogic.com/cts</span>&quot;</span></span><span style="color: rgb(0, 128, 0); font-family: Incolsolata, Consolas, monospace; font-size: 14px; line-height: 1.4; white-space: pre-wrap; widows: 1; background-color: rgb(242, 246, 248);">&gt;</span></div>
<div class="element-value" style="margin: 0px; padding: 0px 0px 0px 0.75em; border-width: 0px 0px 0px 1px; border-left-style: dotted; border-left-color: rgb(204, 204, 204); outline: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 128, 0); font-family: Incolsolata, Consolas, monospace; line-height: 18px; white-space: pre-wrap; widows: 1; background-color: rgb(255, 255, 255); background-position: initial initial; background-repeat: initial initial;">
<div class="element" data-element-name="cts:uri" data-element-prefix="cts" data-element-localname="uri" data-element-namespace-uri="http://marklogic.com/cts" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; cursor: default; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
<span class="toggle" style="margin: -3px 0px 0px -9px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; cursor: pointer; display: inline-block; width: 16px; height: 16px; background-image: url(file://composeviewinternalloadurl/img/open.png); background-color: transparent; background-position: 0px 4px; background-repeat: no-repeat no-repeat;"></span><span class="element-open" tabindex="1" style="margin: 0px; padding: 0px 1px 0px 0px; border: 0px; outline: 0px; vertical-align: baseline; line-height: 1.4; border-top-left-radius: 0.5em; border-bottom-left-radius: 0.5em; background-color: rgb(242, 246, 248); background-position: initial initial; background-repeat: initial initial;">&lt;<span class="element-name" title="cts:uri (http://marklogic.com/cts)" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; cursor: pointer; background-color: transparent; background-position: initial initial; background-repeat: initial initial;"><span class="namespace-prefix" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">cts</span>:<span class="local-name" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">uri</span></span><span class="element-meta" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;"></span>&gt;</span>
<div class="element-value text" style="margin: 0px 0px 0px -1px; padding: 0px; border-width: 0px 0px 0px 1px; border-left-style: dotted; border-left-color: rgb(204, 204, 204); outline: 0px; vertical-align: baseline; display: inline; cursor: text; color: black; background-position: initial initial; background-repeat: initial initial;">
<div class="text" style="margin: 0px 0px 0px -1px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; display: inline; cursor: text; background-position: initial initial; background-repeat: initial initial;">
/Default/samplestack/rest-api/options/</div>
</div>
<span class="element-close" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; line-height: 1.4; border-top-right-radius: 0.5em; border-bottom-right-radius: 0.5em; background-color: rgb(242, 246, 248); background-position: initial initial; background-repeat: initial initial;">&lt;/<span class="element-name" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; cursor: pointer; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">cts:uri</span>&gt;</span></div>
</div>
<span class="element-close" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; line-height: 1.4; border-top-right-radius: 0.5em; border-bottom-right-radius: 0.5em; color: rgb(0, 128, 0); font-family: Incolsolata, Consolas, monospace; white-space: pre-wrap; widows: 1; background-color: rgb(242, 246, 248);">&lt;/<span class="element-name" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; cursor: pointer; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">cts:directory-query</span>&gt;</span>
<div>
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</div>
<div style="color: rgb(0, 0, 0);"><span class="element-close" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; line-height: 1.4; border-top-right-radius: 0.5em; border-bottom-right-radius: 0.5em; color: rgb(0, 128, 0); font-family: Incolsolata, Consolas, monospace; white-space: pre-wrap; widows: 1; background-color: rgb(242, 246, 248);"><br>
</span></div>
<div><span class="element-close" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; line-height: 1.4; border-top-right-radius: 0.5em; border-bottom-right-radius: 0.5em; font-family: Incolsolata, Consolas, monospace; white-space: pre-wrap; widows: 1;">Doc
 says:</span></div>
<div style="color: rgb(0, 0, 0);"><span class="element-close" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; line-height: 1.4; border-top-right-radius: 0.5em; border-bottom-right-radius: 0.5em; color: rgb(0, 128, 0); font-family: Incolsolata, Consolas, monospace; white-space: pre-wrap; widows: 1; background-color: rgb(238, 243, 246);">
<table class="api_generic_table" style="box-sizing: border-box; border-spacing: 0px; border-collapse: collapse; font-size: 12px; line-height: 14.4px; margin: 20px 0px 1em; color: rgb(102, 102, 102); font-family: Tahoma, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); background-position: initial initial; background-repeat: initial initial;">
<tbody style="box-sizing: border-box; border: 1px solid rgb(204, 204, 204);">
<tr style="box-sizing: border-box;">
<td rowspan="1" colspan="1" nowrap="none" style="box-sizing: border-box; padding: 15px 10px; vertical-align: top; border: 1px solid rgb(204, 204, 204); background-image: none;">
<pre xml:space="preserve" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; padding: 1px; margin-top: 0px; margin-bottom: 0px; line-height: 1.42857; color: rgb(51, 51, 51); word-break: break-all; word-wrap: break-word; border: 1px none rgb(204, 204, 204); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; max-width: 100%;">-query_filter <em style="box-sizing: border-box;">string</em></pre>
</td>
<td rowspan="1" colspan="1" nowrap="none" style="box-sizing: border-box; padding: 15px 10px; vertical-align: top; border: 1px solid rgb(204, 204, 204); background-image: none; background-position: 100% 0%;">
Specifies a query to apply when selecting documents for export. The argument must be the XML serialization of a cts:query or JSON serialization of a cts.query. Only documents matching the query are considered for export; false positives are possible. For details,
 see<a href="https://docs.marklogic.com/guide/mlcp/export#id_47556" style="box-sizing: border-box; color: rgb(1, 99, 157); text-decoration: none; background-color: transparent;">Controlling What is Exported, Copied, or Extracted</a>.<br>
<br>
</td>
</tr>
</tbody>
</table>
</span></div>
<div style="color: rgb(0, 0, 0);">HTH.</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<div style="color: rgb(0, 0, 0);">Peter</div>
<div style="color: rgb(0, 0, 0);"><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="color: rgb(0, 0, 0);">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>&lt;<a href="mailto:general-bounces@developer.marklogic.com">general-bounces@developer.marklogic.com</a>&gt; on behalf of Prasanth N V R<br>
<span style="font-weight:bold">Reply-To: </span>MarkLogic Developer Discussion<br>
<span style="font-weight:bold">Date: </span>Monday 25 January 2016 04:59<br>
<span style="font-weight:bold">To: </span>MarkLogic Developer Discussion<br>
<span style="font-weight:bold">Subject: </span>Re: [MarkLogic Dev General] MLCP input query<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Thanks for you reply Christopher.
<div><br>
</div>
<div>Yes. I tried that too. But I am getting error.</div>
<div><br>
</div>
<div>
<div>mlcp.bat copy -input_host localhost -input_port 5767 -input_username admin -input_password admin ^</div>
<div>-output_host localhost -output_port 5767 -output_username admin -output_password admin ^</div>
<div>-input_database samplestack-modules ^</div>
<div>-output_database Documents ^</div>
<div>-query_filter cts:directory-query(&quot;/Default/samplestack/rest-api/options/&quot;,&quot;infinity&quot;)</div>
</div>
<div><br>
</div>
<div>
<div>ERROR mapreduce.MarkLogicInputFormat: com.marklogic.xcc.exceptions.XQueryException: XDMP-DOCROOTTEXT: xdmp:unquote(&quot;cts:directory-query(/Default/samplestack/rest-api/options/,infin...&quot;) -- Invalid root text &quot;cts:directory-query(/Default/samplestack/rest-api/options/,infinity)&quot;
 at &nbsp;line 1</div>
<div>&nbsp;[Session: user=admin, cb=samplestack-modules [ContentSource: user=admin, cb=samplestack-modules</div>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Prasanth</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Jan 24, 2016 at 7:27 PM, Christopher Hamlin <span dir="ltr">
&lt;<a href="mailto:cbhamlin@gmail.com" target="_blank">cbhamlin@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">It looks to me like you are sending in a search, not a query.
<div><br>
</div>
<div>So maybe try&nbsp;</div>
<div><br>
</div>
<div>-query_filter&nbsp;<span style="font-size:12.8px">cts:</span><span style="font-size:12.8px">directory-query(&quot;/Default/</span><span style="font-size:12.8px">samplestack/rest-api/options/&quot;</span><span style="font-size:12.8px">,&quot;infinity&quot;)</span></div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">instead.</span></div>
<div><span style="font-size:12.8px"><br>
</span></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">
<div>
<div class="h5">On Sun, Jan 24, 2016 at 7:22 PM, Prasanth N V R <span dir="ltr">&lt;<a href="mailto:prasanth.nvr04@gmail.com" target="_blank">prasanth.nvr04@gmail.com</a>&gt;</span> wrote:<br>
</div>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="h5">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I am trying to copy documents from one DB to another DB using MLCP.</div>
<div><br>
</div>
<div>Here is my command(running in Windows)</div>
<div>
<div>mlcp.bat copy -input_host localhost -input_port 5767 -input_username admin -input_password admin ^</div>
<div>-output_host localhost -output_port 5767 -output_username admin -output_password admin ^</div>
<div>-input_database samplestack-modules ^</div>
<div>-output_database Documents ^</div>
<div>-query_filter cts:search(doc(),cts:directory-query(&quot;/Default/samplestack/rest-api/options/&quot;,&quot;infinity&quot;))</div>
</div>
<div><br>
</div>
<div>But am getting error when i execute the above command.<br>
</div>
<div>
<div>ERROR mapreduce.MarkLogicInputFormat: com.marklogic.xcc.exceptions.XQueryException: XDMP-DOCROOTTEXT: xdmp:unquote(&quot;cts:search(doc(),cts:directory-query(/Default/samplestack/rest-a...&quot;) -- Invalid root text &quot;cts:search(doc(),cts:directory-query(/Default/samplestack/rest-api/options/,infinity))&quot;
 at &nbsp;line 1</div>
<div>&nbsp;[Session: user=admin, cb=samplestack-modules [ContentSource: user=admin, cb=samplestack-modules</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>How can I pass a query in command line to select matching documents?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Prasanth&nbsp;</div>
</div>
<br>
</div>
</div>
_______________________________________________<br>
General mailing list<br>
<a href="mailto:General@developer.marklogic.com" target="_blank">General@developer.marklogic.com</a><br>
Manage your subscription at:<br>
<a href="http://developer.marklogic.com/mailman/listinfo/general" rel="noreferrer" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
_______________________________________________<br>
General mailing list<br>
<a href="mailto:General@developer.marklogic.com">General@developer.marklogic.com</a><br>
Manage your subscription at:<br>
<a href="http://developer.marklogic.com/mailman/listinfo/general" rel="noreferrer" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span>
</body>
</html>