[MarkLogic Dev General] Marklogic - xdmp:filesystem-file

2017-06-21 Thread Ly CafeSua
I have a text file contains a list over 2 thousands customerid. when
use xdmp:filesystem-file("opt/rec/listid.txt") to make sure it can read all
customer id inside a file. it returns all id as expected.

"00013",
"00014"
"00015"

However when I assigned "xdmp:filesystem-file" to a variable below, the
result always zero.  I could not figure out what wrong. please give me some
hints or sample code.

let $listID := xdmp:filesystem-file("opt/rec/listid.txt")

let $uris := cts:uris( (),(),
  cts:and-query((

cts:collection-query("/collection/customers"),

cts:element-value-query(xs:QName("meta:custid",($listID))
   ))
 )

return count($uris)

result: 0

Thanks
Thichxai
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] field constraint in search API

2017-06-21 Thread Charles Greer
Hi Alan

I think your field contraint is fine-- the default grammar simply expects a 
different syntax.

I could be mistaken, but I think either of the following expressions will give 
you ANDed queries:

ANY:"x AND y"

ANY:x ANY:y

See if that gives you what you need.  There may be a way beyond this to use the 
grammar configuration
to move you toward the syntax you've used, but it's not occurring to me off the 
top of my head.


Charles


Charles Greer
Lead Engineer
MarkLogic Corporation
cgr...@marklogic.com
Cell:  +1 707 318 0442
@grechaw
www.marklogic.com


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Alan Darnell 
[alan.darn...@utoronto.ca]
Sent: Tuesday, June 20, 2017 2:54 PM
To: General Developer Discussion
Subject: [MarkLogic Dev General] field constraint in search API

Having a little trouble setting up a field constraint in the Search API and 
can’t find an answer in the documentation.

We’ve created a field called “anywhere” composed of a number of elements that 
appear in our standard XML document.

We’ve also created a constraint called ANY defined as:







We are sending the string ANY:(x y) to the search API.  We are looking for this 
to turn into two AND’d word queries but what we get is a phrase search on “x y”.

Here’s the output from the search API:


(cts:search(/book, cts:field-word-query("anywhere", "x y", ("lang=en"), 1), 
("score-logtfidf",cts:score-order("descending")), 1))[1 to 20]


We were hoping instead for something like this.


(cts:search(/book, cts:field-word-query(“anywhere"), 
cts:and-query((cts:word-query("x", 
("case-insensitive","diacritic-insensitive","punctuation-insensitive","wildcarded","lang=en"),
 1), cts:word-query("y", 
("case-insensitive","diacritic-insensitive","punctuation-insensitive","wildcarded","lang=en"),
 1)), ()), ()), ("score-logtfidf",cts:score-order("descending")), 1))[1 to 20]


Is this kind of search possible with fields?  If so, how should the constraint 
be defined?

Thanks in advance,

Alan
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] reg: Forest replica configuration

2017-06-21 Thread Karunanithi, Bharathi
Hi,

I tried removing the replica from the master forest and assigned the replica 
again. But it’s still in wait replicating mount state with

Mount State

wait replication since June 21, 2017 11:36:12 AM

Mount State Detail

deferring to forest CondeNastDAM-Modules-Forest-1




Thanks,
Bharathi K

From: kirti singh [mailto:mail2kirt...@gmail.com]
Sent: Wednesday, June 21, 2017 8:48 PM
To: Karunanithi, Bharathi
Subject: Re: [MarkLogic Dev General] reg: Forest replica configuration

Hi,

Can you trying detaching  replica forest and attaching it again ?

Please ensure that this will move data from master to replica forest.

Thanks
Kirti

On Jun 21, 2017 5:10 PM, "Karunanithi, Bharathi" 
> 
wrote:
Hi Team,

We are having 3 hosts in our application cluster. The data is split among these 
3 hosts and made it has replica in atleast one other host.
I have configured the forests to be the master and the replica set as given 
below:
[cid:image001.png@01D2EAD2.E6140870]

As can be seen, the forests are in wait replication state with reason to be 
“not yet sure who is master“.
Please let me know how to make them sync replicating. I have tried restarting 
the forests but they are not syncing to its master.

Thanks,
Bharathi K

___
General mailing list
General@developer.marklogic.com
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] reg: Forest replica configuration

2017-06-21 Thread Karunanithi, Bharathi
Hi Team,

We are having 3 hosts in our application cluster. The data is split among these 
3 hosts and made it has replica in atleast one other host.
I have configured the forests to be the master and the replica set as given 
below:
[cid:image001.png@01D2EACE.2BE0EFD0]

As can be seen, the forests are in wait replication state with reason to be 
"not yet sure who is master".
Please let me know how to make them sync replicating. I have tried restarting 
the forests but they are not syncing to its master.

Thanks,
Bharathi K
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general