To follow up on Ashley's question: yes, xdmp:document-add-collections() will 
retain the document's current collections. (Use 
xdmp:document-set-collections()<http://docs.marklogic.com/xdmp:document-set-collections>
 to replace the existing ones with new ones.)

That said, I like David Gorbet's idea. Both the collection-based approach and 
the status property approach suggested by Geert require making sure that all 
queries respect the difference, while using security to make documents become 
visible automatically applies to all searches.

--
Dave Cassel<http://davidcassel.net>, @dmcassel<https://twitter.com/dmcassel>
Technical Community Manager
MarkLogic Corporation<http://www.marklogic.com/>
http://developer.marklogic.com/


From: 
<[email protected]<mailto:[email protected]>>
 on behalf of Geert Josten 
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Saturday, January 23, 2016 at 2:35 PM
To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] A way to detect CPF updates complete?

CPF automatically adds a status property that receives the value ‘done’ 
whenever it depleted states and pipelines to go through..

Cheers,
Geert

From: 
<[email protected]<mailto:[email protected]>>
 on behalf of David Gorbet 
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Friday, January 22, 2016 at 6:00 PM
To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] A way to detect CPF updates complete?

You could also potentially use permissions to do this, which might be more 
broadly useful since you don’t have to be sure that each search is aware of the 
collection issue.

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Ashley Peacock
Sent: Friday, January 22, 2016 8:56 AM
To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] A way to detect CPF updates complete?

Sounds like a nice idea.

If I use https://docs.marklogic.com/xdmp:document-add-collections will it 
maintain any existing collections, and simply just add a new one if I were to 
add “searchable”?

Ashley




[cid:[email protected]]


[cid:[email protected]]


Ashley Peacock


Developer II
Elevate Credit International Limited
P: 01284 717800 | Ext: 877 |  Elevate.co.uk<http://elevate.co.uk>
Amadeus House, Floral Street, Covent Garden, London WC2E 9DP




Privileged and Confidential. This e-mail, and any attachments thereto, is 
intended only for use by the addressee(s) named herein and may contain 
privileged and/or confidential information. If you have received this e-mail in 
error, please notify me immediately by a return e-mail and delete this e-mail. 
You are hereby notified that any dissemination, distribution or copying of this 
e-mail and/or any attachments thereto, is strictly prohibited.

Elevate Credit International Limited is registered in England & Wales with 
Company Number 05041905. Registered Office: 27-28 Eastcastle Street, London, 
W1W 8DH


From:[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Dave Cassel
Sent: 22 January 2016 16:52
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] A way to detect CPF updates complete?

Simplest way may be that the last CPF step moves the document into a 
"searchable" collection and your search options include that criterion as an 
additional-query<http://docs.marklogic.com/guide/rest-dev/appendixb#id_98507>.

--
Dave Cassel<http://davidcassel.net>, @dmcassel<https://twitter.com/dmcassel>
Technical Community Manager
MarkLogic Corporation<http://www.marklogic.com/>
http://developer.marklogic.com/


From: 
<[email protected]<mailto:[email protected]>>
 on behalf of Ashley Peacock 
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Friday, January 22, 2016 at 8:41 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] A way to detect CPF updates complete?

Hey,

I’m running a CPF upon insert in to a database. Is there a way of detecting 
when the updates or done, so that I only query documents that have completed 
the CPF amendments?

Otherwise it seems that if the document is retrieved and update in the database 
before that has a chance to complete, it overwrites the pending job and it 
never completes.

I’m using the REST API to retrieve the documents for reference.

Thanks,

Ashley



[cid:[email protected]]


[cid:[email protected]]


Ashley Peacock


Developer II
Elevate Credit International Limited
P: 01284 717800 | Ext: 877 |  Elevate.co.uk<http://elevate.co.uk>
Amadeus House, Floral Street, Covent Garden, London WC2E 9DP




Privileged and Confidential. This e-mail, and any attachments thereto, is 
intended only for use by the addressee(s) named herein and may contain 
privileged and/or confidential information. If you have received this e-mail in 
error, please notify me immediately by a return e-mail and delete this e-mail. 
You are hereby notified that any dissemination, distribution or copying of this 
e-mail and/or any attachments thereto, is strictly prohibited.

Elevate Credit International Limited is registered in England & Wales with 
Company Number 05041905. Registered Office: 27-28 Eastcastle Street, London, 
W1W 8DH




Click 
here<https://www.mailcontrol.com/sr/x!DQU+hxmorGX2PQPOmvUgItITKVa7z0shOzgc232dAgHWdvRA3SCxgK8bo9MCl!x!u1Z1s0kpn3Y22mGO5KhQ==>
 to report this email as spam.
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to