[MarkLogic Dev General] Re: Saving a document with properties

Runstein, Robert E. (Contr) (IS) Robert.Runstein at ngc.com
Wed May 20 10:54:48 PDT 2009


 
I do think that my example would be atomic.  I was just asking if this
is the best way to accomplish this.  Sorry if the last line of my
previous post was misleading.  The example is just one call to the
database.

Bob
-----Original Message-----
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of
general-request at developer.marklogic.com
Sent: Wednesday, May 20, 2009 11:18 AM
To: general at developer.marklogic.com
Subject: General Digest, Vol 59, Issue 25

Send General mailing list submissions to
	general at developer.marklogic.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://xqzone.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
	general-request at developer.marklogic.com

You can reach the person managing the list at
	general-owner at developer.marklogic.com

When replying, please edit your Subject line so it is more specific than
"Re: Contents of General digest..."


Today's Topics:

   1. ingest log files? (Jakob Fix)
   2. start using lib-search (Meropi Petraki)
   3. session.insertContent vs	xdmp:document-insert
      (Runstein, Robert E. (Contr) (IS))
   4. Saving a document with properties
      (Runstein, Robert E. (Contr) (IS))
   5. Re: Saving a document with properties (Michael Blakeley)
   6. RE: session.insertContent vs	xdmp:document-insert (Danny
Sokolsky)


----------------------------------------------------------------------

Message: 1
Date: Wed, 20 May 2009 10:38:03 +0200
From: Jakob Fix <jakob.fix at gmail.com>
Subject: [MarkLogic Dev General] ingest log files?
To: general at developer.marklogic.com
Message-ID:
	<d966f0ff0905200138g441fdca2j6307d1903cfbacd6 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hello,

here's another question from a MarkLogic newbie.  I was thinking of
indexing Apache log files (or any other line-based log files, for this
matter) for later exploitation.  I was thinking of feeding  this XML to
some kind of dashboard application which would be able to create nice
graphs and buckets etc.

Is it possible and does it make sense at all to create a CPF pipeline
that will parse and enrich each line to create an XML representation?
Is something like this already worked on? Another approach?

--
cheers,
Jakob.


------------------------------

Message: 2
Date: Wed, 20 May 2009 13:09:49 +0300
From: "Meropi Petraki" <petraki at ics.forth.gr>
Subject: [MarkLogic Dev General] start using lib-search
To: <general at developer.marklogic.com>
Message-ID: <16C4C86152F84EED88415E8672CCF726 at ics.forth.gr>
Content-Type: text/plain; charset="us-ascii"

Hi,

 

Sorry for the following question but I'm new to MarkLogic and have some
difficulties with some basic stuff you mention in the lib-search. 

In the Get-started section some steps are mentioned, where some
clarrification could help: 

 

Step 1: Create a project folder. Where should I create the project
folder?
Inside the installation directory of MarkLogic? Or anywhere on my
computer?

 

Step 3: Createn an XDMP site. What is an XDMP site? I know that xdmp is
a
namespace prefix that is used for invoking some build - in functions.
But
how I create a XDMP site? And how do I point to a project folder and to
the
database I want. 

 

Step 4: Fire up CQ. The CQ is the known Content Query Application I
installed to start working with my uploaded data? If yes then its until
there Okay. But how I point to the XDMP site using CQ? 

 

I suggest that understanding these 3 steps will make it easier to
understand
to make step 4 and step 5. 

 

Thank you. 

 

With Regards,

Meropi

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://xqzone.marklogic.com/pipermail/general/attachments/20090520/e6176
750/attachment-0001.html

------------------------------

Message: 3
Date: Wed, 20 May 2009 10:00:43 -0500
From: "Runstein, Robert E. (Contr) (IS)" <Robert.Runstein at ngc.com>
Subject: [MarkLogic Dev General] session.insertContent vs
	xdmp:document-insert
To: <general at developer.marklogic.com>
Message-ID:
	
<CAC299042EEEBA40B1DD0321A01E5C2F01CDFDFE at XMBTX132.northgrum.com>
Content-Type: text/plain; charset="us-ascii"

What is the difference between session.insertContent and
xdmp:document-insert?  When using xcc is there any advantage to using
one over the other?  Thanks.

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://xqzone.marklogic.com/pipermail/general/attachments/20090520/26660
404/attachment-0001.html

------------------------------

Message: 4
Date: Wed, 20 May 2009 10:16:20 -0500
From: "Runstein, Robert E. (Contr) (IS)" <Robert.Runstein at ngc.com>
Subject: [MarkLogic Dev General] Saving a document with properties
To: <general at developer.marklogic.com>
Message-ID:
	
<CAC299042EEEBA40B1DD0321A01E5C2F01CDFDFF at XMBTX132.northgrum.com>
Content-Type: text/plain; charset="us-ascii"

I want to insert a new document with some custom properties using xcc.
The xdmp:document-add-properties function requires the document to exist
in the database and I want the insert and add of the properties to be
atomic.  While I could probably do something like

xdmp:document-insert($document, $documentUri),
xdmp:document-add-properties($documentUri, $properties)

I'm wondering if there is a way to do this with a single call to to the
database.  Thanks.

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://xqzone.marklogic.com/pipermail/general/attachments/20090520/6f7db
e20/attachment-0001.html

------------------------------

Message: 5
Date: Wed, 20 May 2009 08:57:03 -0700
From: Michael Blakeley <michael.blakeley at marklogic.com>
Subject: Re: [MarkLogic Dev General] Saving a document with properties
To: General Mark Logic Developer Discussion
	<general at developer.marklogic.com>
Message-ID: <4A14284F.3060300 at marklogic.com>
Content-Type: text/plain; charset=UTF-8; format=flowed

Robert,

Why wouldn't your example be an atomic statement?

The transaction model might be clearer after a review of chapter 3 in 
the developer guide: "Understanding Transactions in MarkLogic Server"

   http://developer.marklogic.com/pubs/

You may find the section titled "Example: Incrementing the System 
Timestamp" especially illuminating.

-- Mike

On 2009-05-20 08:16, Runstein, Robert E. (Contr) (IS) wrote:
> I want to insert a new document with some custom properties using xcc.
The xdmp:document-add-properties function requires the document to exist
in the database and I want the insert and add of the properties to be
atomic.  While I could probably do something like
>
> xdmp:document-insert($document, $documentUri),
xdmp:document-add-properties($documentUri, $properties)
>
> I'm wondering if there is a way to do this with a single call to to
the database.  Thanks.
>
> Bob
>



------------------------------

Message: 6
Date: Wed, 20 May 2009 10:36:49 -0700
From: Danny Sokolsky <Danny.Sokolsky at marklogic.com>
Subject: RE: [MarkLogic Dev General] session.insertContent vs
	xdmp:document-insert
To: General Mark Logic Developer Discussion
	<general at developer.marklogic.com>
Message-ID:
	
<C9924D15B04672479B089F7D55FFC1322566E6DD at EXCHG-BE.marklogic.com>
Content-Type: text/plain; charset="us-ascii"

Hi Robert,

I am not a much of a Java guy, so others might be better to comment on
this one, but I think the difference is that with session.insertContent,
you are using Java to stream in the content to MarkLogic Server.  With
xdmp:document-insert, you are using XQuery to create the content in
memory to insert.  If you have a large amount of content on the client
machine (where the XCC program is running) to load, then it makes sense
to use insertContent.  I believe this is what the open source project
RecordLoader does (http://developer.marklogic.com/code/#recordloader).

-Danny

From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Runstein,
Robert E. (Contr) (IS)
Sent: Wednesday, May 20, 2009 8:01 AM
To: general at developer.marklogic.com
Subject: [MarkLogic Dev General] session.insertContent vs
xdmp:document-insert


What is the difference between session.insertContent and
xdmp:document-insert?  When using xcc is there any advantage to using
one over the other?  Thanks.

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://xqzone.marklogic.com/pipermail/general/attachments/20090520/f306d
dbb/attachment.html

------------------------------

_______________________________________________
General mailing list
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general


End of General Digest, Vol 59, Issue 25
***************************************


More information about the General mailing list