[MarkLogic Dev General] Define range partition key REST Example

2018-01-03 Thread Shmennen
Hello All,
   I am searching for a REST API example to define a range partition key using 
JSON.The official doc from here 
https://docs.marklogic.com/guide/admin/tiered-storage#id_42177 describes a 
sequence of commands via UI but I am wondering if there is a REST API option to 
perform all of these commands automatically via REST.
An example containing below details would be very useful:- assignment policy: 
range- range indexes type: Path- atomic type specification: int- name: 
/bar:foo/bar:toto:bar:fuzz

Really appreciate your help- Ric

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


Re: [MarkLogic Dev General] Document access based on field value

2017-11-07 Thread Shmennen
Thank you all!
-Ric 
 
  On Tue, Nov 7, 2017 at 22:11, Geert Josten<geert.jos...@marklogic.com> wrote: 
  Hi Richard,
It is usually easiest to build up a few layers of roles. Most flexibility is 
gained when you create separate read and update roles for each group of 
documents to which you want to control access separately. You can then use role 
inheritance to give a user or usergroup-specific role access to particular 
groups of documents. You could also create one that has access to all.
To save on cross-products of roles, I’d also advice looking into compartment 
security. That allows restricting access to combinations of roles, bit like AND 
(compartments) versus OR (default behavior)..
Cheers,Geert
From: <general-boun...@developer.marklogic.com> on behalf of Shmennen 
<shmen...@yahoo.com>
Reply-To: "shmen...@yahoo.com" <shmen...@yahoo.com>, MarkLogic Developer 
Discussion <general@developer.marklogic.com>
Date: Tuesday, November 7, 2017 at 9:57 PM
To: Rob Szkutak <rob.szku...@marklogic.com>, MarkLogic Developer Discussion 
<general@developer.marklogic.com>
Subject: Re: [MarkLogic Dev General] Document access based on field value

Thanks, it looks good!
Btw, another question, may be not related: is there any way to assign some 
capabilities (e.g. insert, update, execute) to an user who can access all docs, 
no matter what roles and privileges they have in db? E.g. some power user to 
have access (read/write) to all docs, independent of users they were inserted, 
but to not be admin.
RegardsRichard W.


On Tue, Nov 7, 2017 at 19:20, Rob Szkutak<rob.szku...@marklogic.com> 
wrote:#yiv9954050599 -- P {margin-top:0;margin-bottom:0;}#yiv9954050599 
Hello,




One solution to implement this is to use amplified functions (amps).




The basic idea is this:




* Restrict the document so that the user cannot read or update it. 

* Create a function which the user must use to read or update the document. 

* Amplify the function so that the user can read or modify the document only 
within your function.

* Have your function perform the validation check and either perform the 
desired document operation or return the appropriate invalid document response 
to the user.







Another solution is that every time a document is inserted or updated, you 
could perform a check if the document is valid or not and assign the 
appropriate role to it when the document is placed into the database. 




Something like : 

let $valid := true or false

return

 xdmp:document-insert("uri", $document, if($valid) then xdmp:permission("user 
can read") else xdmp:permission("user cannot read"))







If required you may also combine these two techniques.




Hope this is helpful.




Best,

Rob



Rob SzkutakSenior ConsultantMarkLogic Corporationwww.marklogic.com
From:general-boun...@developer.marklogic.com 
<general-boun...@developer.marklogic.com> on behalf of Shmennen 
<shmen...@yahoo.com>
Sent: Tuesday, November 7, 2017 10:54:40 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Document access based on field value Hello All,
   Is there any possibility to get access to a document (suppose an XML or 
JSON) from database only if the value of a tag has a specific values?
E.g. user1can read/modify document if only checktag has value "VALID".    
 999
    VALID

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


Re: [MarkLogic Dev General] Document access based on field value

2017-11-07 Thread Shmennen
Thanks, it looks good!
Btw, another question, may be not related: is there any way to assign some 
capabilities (e.g. insert, update, execute) to an user who can access all docs, 
no matter what roles and privileges they have in db? E.g. some power user to 
have access (read/write) to all docs, independent of users they were inserted, 
but to not be admin.
RegardsRichard W.

 
  On Tue, Nov 7, 2017 at 19:20, Rob Szkutak<rob.szku...@marklogic.com> wrote:   
#yiv8687077562 #yiv8687077562 -- P 
{margin-top:0;margin-bottom:0;}#yiv8687077562 
Hello,




One solution to implement this is to use amplified functions (amps).




The basic idea is this:




* Restrict the document so that the user cannot read or update it. 

* Create a function which the user must use to read or update the document. 

* Amplify the function so that the user can read or modify the document only 
within your function.

* Have your function perform the validation check and either perform the 
desired document operation or return the appropriate invalid document response 
to the user.







Another solution is that every time a document is inserted or updated, you 
could perform a check if the document is valid or not and assign the 
appropriate role to it when the document is placed into the database. 




Something like : 

let $valid := true or false

return

 xdmp:document-insert("uri", $document, if($valid) then xdmp:permission("user 
can read") else xdmp:permission("user cannot read"))







If required you may also combine these two techniques.




Hope this is helpful.




Best,

Rob



Rob SzkutakSenior ConsultantMarkLogic Corporationwww.marklogic.com
From: general-boun...@developer.marklogic.com 
<general-boun...@developer.marklogic.com> on behalf of Shmennen 
<shmen...@yahoo.com>
Sent: Tuesday, November 7, 2017 10:54:40 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Document access based on field value Hello All,
   Is there any possibility to get access to a document (suppose an XML or 
JSON) from database only if the value of a tag has a specific values?
E.g. user1 can read/modify document if only checktag has value "VALID".   
  999
    VALID

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


[MarkLogic Dev General] Document access based on field value

2017-11-07 Thread Shmennen
Hello All,
   Is there any possibility to get access to a document (suppose an XML or 
JSON) from database only if the value of a tag has a specific values?
E.g. user1 can read/modify document if only check tag has value "VALID".  
   999
    VALID

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


Re: [MarkLogic Dev General] Data Masking on Import/Export

2017-10-30 Thread Shmennen
Any thoughts about how to import masked data in MarkLogic? Some built in 
features?
ThanksRic 
 
  On Mon, Oct 30, 2017 at 18:34, Shmennen<shmen...@yahoo.com> wrote:   Thanks 
Erik, indeed I could not find anything in the docs ...
BTW, I found this thread 
http://developer.marklogic.com/pipermail/general/2015-March/016633.html which 
mentions about data masking in context of flexible replication. I have 
configured one Master and one Slave based on 
https://docs.marklogic.com/guide/flexrep/quick_start#id_50142 but the info is 
not masked on Slave. Do you know what I can configure in addition to mask data 
on flexible replication?
-Ric



 

On Monday, October 30, 2017 6:24 PM, Erik Hennum 
<erik.hen...@marklogic.com> wrote:
 

 Hi, Ric:

So far as I know, redaction is purely an export feature.


Erik Hennum



____
From: Shmennen <shmen...@yahoo.com>
Sent: Monday, October 30, 2017 2:51:20 AM
To: Erik Hennum; General@developer.marklogic.com
Subject: Re: [MarkLogic Dev General] Data Masking on Import/Export

Thanks Erik.

Is there any way to import the masked data (e.g. the masked fields + updated 
not-masked fields) and MarkLogic to do the correlation on the fly for masked 
data? I could not find this in the Redaction part...

Thanks
Ric


On Saturday, October 28, 2017 2:34 AM, Erik Hennum <erik.hen...@marklogic.com> 
wrote:


Hi, Richard:

These are two separate features, which were introduced in MarkLogic 9:

*  Element Level Security prevents access to unpermitted branches of the 
document
    http://docs.marklogic.com/guide/security/element

*  Redaction masks data on export
    http://docs.marklogic.com/guide/app-dev/redaction

A redacted export of the data can only be generated by a user with a role that
has permission to access to the data.  The user who generates the redacted 
export
can, of course, make the redacted data available to users without permission
to access the data.


Erik Hennum




From: 
general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>
 
<general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>>
 on behalf of Shmennen <shmen...@yahoo.com<mailto:shmen...@yahoo.com>>
Sent: Thursday, October 26, 2017 1:26:50 PM
To: General@developer.marklogic.com<mailto:General@developer.marklogic.com>
Subject: [MarkLogic Dev General] Data Masking on Import/Export

Hello All,

  Could you please point me to some useful documentation in order to configure 
data masking in MarkLogic?
e.g. If a user cannot see field A inside an XML (e.g. user is not granted to 
permissions for that field), on export that field A should be masked. Then, if 
user modifies the exported data (fields he has access to, not the one masked) 
and wants to re-import it, then the field masked should be correlated to the 
initial value from ML.

Thanks
-Richard



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


Re: [MarkLogic Dev General] Data Masking on Import/Export

2017-10-30 Thread Shmennen
Thanks Erik, indeed I could not find anything in the docs ...
BTW, I found this thread 
http://developer.marklogic.com/pipermail/general/2015-March/016633.html which 
mentions about data masking in context of flexible replication. I have 
configured one Master and one Slave based on 
https://docs.marklogic.com/guide/flexrep/quick_start#id_50142 but the info is 
not masked on Slave. Do you know what I can configure in addition to mask data 
on flexible replication?
-Ric



 

On Monday, October 30, 2017 6:24 PM, Erik Hennum 
<erik.hen...@marklogic.com> wrote:
 

 Hi, Ric:

So far as I know, redaction is purely an export feature.


Erik Hennum




From: Shmennen <shmen...@yahoo.com>
Sent: Monday, October 30, 2017 2:51:20 AM
To: Erik Hennum; General@developer.marklogic.com
Subject: Re: [MarkLogic Dev General] Data Masking on Import/Export

Thanks Erik.

Is there any way to import the masked data (e.g. the masked fields + updated 
not-masked fields) and MarkLogic to do the correlation on the fly for masked 
data? I could not find this in the Redaction part...

Thanks
Ric


On Saturday, October 28, 2017 2:34 AM, Erik Hennum <erik.hen...@marklogic.com> 
wrote:


Hi, Richard:

These are two separate features, which were introduced in MarkLogic 9:

*  Element Level Security prevents access to unpermitted branches of the 
document
    http://docs.marklogic.com/guide/security/element

*  Redaction masks data on export
    http://docs.marklogic.com/guide/app-dev/redaction

A redacted export of the data can only be generated by a user with a role that
has permission to access to the data.  The user who generates the redacted 
export
can, of course, make the redacted data available to users without permission
to access the data.


Erik Hennum




From: 
general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>
 
<general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>>
 on behalf of Shmennen <shmen...@yahoo.com<mailto:shmen...@yahoo.com>>
Sent: Thursday, October 26, 2017 1:26:50 PM
To: General@developer.marklogic.com<mailto:General@developer.marklogic.com>
Subject: [MarkLogic Dev General] Data Masking on Import/Export

Hello All,

  Could you please point me to some useful documentation in order to configure 
data masking in MarkLogic?
e.g. If a user cannot see field A inside an XML (e.g. user is not granted to 
permissions for that field), on export that field A should be masked. Then, if 
user modifies the exported data (fields he has access to, not the one masked) 
and wants to re-import it, then the field masked should be correlated to the 
initial value from ML.

Thanks
-Richard



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


Re: [MarkLogic Dev General] Data Masking on Import/Export

2017-10-30 Thread Shmennen
Thanks Erik.
Is there any way to import the masked data (e.g. the masked fields + updated 
not-masked fields) and MarkLogic to do the correlation on the fly for masked 
data? I could not find this in the Redaction part...
ThanksRic 

On Saturday, October 28, 2017 2:34 AM, Erik Hennum 
<erik.hen...@marklogic.com> wrote:
 

 Hi, Richard:

These are two separate features, which were introduced in MarkLogic 9:

*  Element Level Security prevents access to unpermitted branches of the 
document
    http://docs.marklogic.com/guide/security/element

*  Redaction masks data on export
    http://docs.marklogic.com/guide/app-dev/redaction

A redacted export of the data can only be generated by a user with a role that
has permission to access to the data.  The user who generates the redacted 
export
can, of course, make the redacted data available to users without permission
to access the data.


Erik Hennum



From: general-boun...@developer.marklogic.com 
<general-boun...@developer.marklogic.com> on behalf of Shmennen 
<shmen...@yahoo.com>
Sent: Thursday, October 26, 2017 1:26:50 PM
To: General@developer.marklogic.com
Subject: [MarkLogic Dev General] Data Masking on Import/Export

Hello All,

  Could you please point me to some useful documentation in order to configure 
data masking in MarkLogic?
e.g. If a user cannot see field A inside an XML (e.g. user is not granted to 
permissions for that field), on export that field A should be masked. Then, if 
user modifies the exported data (fields he has access to, not the one masked) 
and wants to re-import it, then the field masked should be correlated to the 
initial value from ML.

Thanks
-Richard

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


[MarkLogic Dev General] Data Masking on Import/Export

2017-10-26 Thread Shmennen
Hello All,
   Could you please point me to some useful documentation in order to configure 
data masking in MarkLogic?e.g. If a user cannot see field A inside an XML (e.g. 
user is not granted to permissions for that field), on export that field A 
should be masked. Then, if user modifies the exported data (fields he has 
access to, not the one masked) and wants to re-import it, then the field masked 
should be correlated to the initial value from ML.
Thanks-Richard___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] XQuery in async multidoc operations

2017-09-27 Thread Shmennen
I just want to extract a bunch of docs from MarkLogic as a result a single 
XQuery. Because the result might is huge ( thoundsand of docs) I thought of 
this asynch way.
Thank 
 
  On Wed, Sep 27, 2017 at 16:35, Dave Cassel<david.cas...@marklogic.com> wrote: 
  More specifically, do you mean you want to read a bunch of documents from 
some other source and insert them into MarkLogic? Or are you looking to make 
changes to a bunch of documents already in MarkLogic? Do you want to do so 
asynchronously because there will be too many for a single transaction? 
-- Dave Cassel, @dmcassel
Technical Community ManagerMarkLogic Corporation
http://developer.marklogic.com/
From: <general-boun...@developer.marklogic.com> on behalf of Shmennen 
<shmen...@yahoo.com>
Reply-To: "shmen...@yahoo.com" <shmen...@yahoo.com>, MarkLogic Developer 
Discussion <general@developer.marklogic.com>
Date: Tuesday, September 26, 2017 at 11:37 PM
To: Justin Makeig <justin.mak...@marklogic.com>, MarkLogic Developer Discussion 
<general@developer.marklogic.com>
Subject: Re: [MarkLogic Dev General] XQuery in async multidoc operations

Hello,
   I want to trigger bulk read/ write operations to MarkLogic into an asynch 
fashion using XQuery. 
   I thought using asynch multi doc operations would be a fit but I did not 
find any XQuery examples for them.
RegardsPaul

On Tue, Sep 26, 2017 at 21:49, Justin Makeig<justin.mak...@marklogic.com> 
wrote:Rather than describing your solution, can you tell us about the problem 
you’re trying to solve? Are you trying to do a bulk transformation?

Justin

--
Justin Makeig
Senior Director, Product Management
MarkLogic
jmak...@marklogic.com

> On Sep 26, 2017, at 10:02 AM, Shmennen <shmen...@yahoo.com> wrote:
> 
> Hello All,
> 
>    Is there any option to perform XQueries in asynchronous multidocument 
>operations? Based on dochttps://docs.marklogic.com/guide/java/data-movement I 
>cannot find anything useful.
> 
> Thanks
> Paul JP.
> ___
> 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

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


Re: [MarkLogic Dev General] XQuery in async multidoc operations

2017-09-26 Thread Shmennen
Hello,
   I want to trigger bulk read/ write operations to MarkLogic into an asynch 
fashion using XQuery. 
   I thought using asynch multi doc operations would be a fit but I did not 
find any XQuery examples for them.
RegardsPaul 
 
  On Tue, Sep 26, 2017 at 21:49, Justin Makeig<justin.mak...@marklogic.com> 
wrote:   Rather than describing your solution, can you tell us about the 
problem you’re trying to solve? Are you trying to do a bulk transformation?

Justin

--
Justin Makeig
Senior Director, Product Management
MarkLogic
jmak...@marklogic.com

> On Sep 26, 2017, at 10:02 AM, Shmennen <shmen...@yahoo.com> wrote:
> 
> Hello All,
> 
>    Is there any option to perform XQueries in asynchronous multidocument 
>operations? Based on doc https://docs.marklogic.com/guide/java/data-movement  
>I cannot find anything useful.
> 
> Thanks
> Paul JP.
> ___
> 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
  
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] XQuery in async multidoc operations

2017-09-26 Thread Shmennen
Hello All,
   Is there any option to perform XQueries in asynchronous multidocument 
operations? Based on doc https://docs.marklogic.com/guide/java/data-movement  I 
cannot find anything useful.
ThanksPaul JP.___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] [MarkLogic] Data Locality

2017-08-29 Thread Shmennen
Hello All,
   I am quite new with MarkLogic, but I would like to ask you about following 
scenario:- suppose we have a cluster with 2 nodes located on different physical 
nodes; e.g. A and B- each node contains replicated data
   If I run a query from host A, is there any change to get data returned by 
that host (e.g. D node from host A)? Generally speaking, this might be a 
performance improvement to return data from the host which contains it and it 
is closer to the caller...
   Going further, suppose we have sort of map reduce pattern. Is data processed 
(e.g. reduced) on the node it exists and then returned back to the caller (e.g. 
to benefit of caching)?
  Please let me know your input.
Best RegardsJohnny___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] [MarkLogic] Data Locality

2017-08-29 Thread Shmennen
Hello All,
   I am quite new with MarkLogic, but I would like to ask you about following 
scenario:- suppose we have a cluster with 2 nodes located on different physical 
nodes; e.g. A and B- each node contains replicated data
   If I run a query from host A, is there any change to get data returned by 
that host (e.g. D node from host A)? Generally speaking, this might be a 
performance improvement to return data from the host which contains it and it 
is closer to the caller...
   Going further, suppose we have sort of map reduce pattern. Is data processed 
(e.g. reduced) on the node it exists and then returned back to the caller (e.g. 
to benefit of caching)?
  Please let me know your input.
Best RegardsJohnny___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Segmentation fault when start MarkLogic

2017-08-24 Thread Shmennen
Hi,
  It is Cent OS 6 on 64 bits. It should correspond because is the official VM 
provided by the Course lab ( which comes with MarkLogic already downloaded )...
Regards 
 
  On Thu, Aug 24, 2017 at 16:05, Dave Cassel<david.cas...@marklogic.com> wrote: 
  Was this CentOS 6 or 7? Can you check whether you have the MarkLogic download 
that corresponds to the correct version? 
-- Dave Cassel, @dmcassel
Technical Community ManagerMarkLogic Corporation
http://developer.marklogic.com/
From: <general-boun...@developer.marklogic.com> on behalf of Shmennen 
<shmen...@yahoo.com>
Reply-To: Shmennen <shmen...@yahoo.com>, MarkLogic Developer Discussion 
<general@developer.marklogic.com>
Date: Thursday, August 24, 2017 at 9:54 AM
To: "General@developer.marklogic.com" <General@developer.marklogic.com>
Subject: [MarkLogic Dev General] Segmentation fault when start MarkLogic

Hello All,
    I am trying to start the MarkLogic on CentOS (inside the VM with 
MarkLogic-8.0-3.2.x86_64 provided by Course Lab) and I get below error:
2017-08-24 14:49:59.557 Notice: Starting MarkLogic Server 8.0-3.2 x86_64 in 
/opt/MarkLogic with data in /var/opt/MarkLogic
Segmentation fault in thread 0x7f94e8c19740 addr 0x10
#0  0x00368e40f2ee in waitpid () from /lib64/libpthread.so.0
#1  0x037c3418 in xdmp::pstack() ()
#2  0x037c372d in pstackSignalAction ()
#3  
#4  0x037f502f in xdmp::Server::init() ()
#5  0x037fb985 in xdmp::runInitialization() ()
#6  0x037fcbd9 in xdmp::run() ()
#7  0x037ffeca in xdmp::daemon(int, char const**) ()
#8  0x00368e01ed5d in __libc_start_main () from /lib64/libc.so.6
#9  0x00cdca59 in _start ()
2017-08-24 14:50:00.559 Notice: Starting MarkLogic Server 8.0-3.2 x86_64 in 
/opt/MarkLogic with data in /var/opt/MarkLogic

Notice that I just downloaded the VM without any modification .
Regards
  
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Segmentation fault when start MarkLogic

2017-08-24 Thread Shmennen
Hello All,
    I am trying to start the MarkLogic on CentOS (inside the VM with 
MarkLogic-8.0-3.2.x86_64 provided by Course Lab) and I get below error:
2017-08-24 14:49:59.557 Notice: Starting MarkLogic Server 8.0-3.2 x86_64 in 
/opt/MarkLogic with data in /var/opt/MarkLogic
Segmentation fault in thread 0x7f94e8c19740 addr 0x10
#0  0x00368e40f2ee in waitpid () from /lib64/libpthread.so.0
#1  0x037c3418 in xdmp::pstack() ()
#2  0x037c372d in pstackSignalAction ()
#3  
#4  0x037f502f in xdmp::Server::init() ()
#5  0x037fb985 in xdmp::runInitialization() ()
#6  0x037fcbd9 in xdmp::run() ()
#7  0x037ffeca in xdmp::daemon(int, char const**) ()
#8  0x00368e01ed5d in __libc_start_main () from /lib64/libc.so.6
#9  0x00cdca59 in _start ()
2017-08-24 14:50:00.559 Notice: Starting MarkLogic Server 8.0-3.2 x86_64 in 
/opt/MarkLogic with data in /var/opt/MarkLogic

Notice that I just downloaded the VM without any modification .
Regards
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general