Hi Gary,

It is not necessary to create a range index to search.  You just need to
search over the properties axis.  For example:

xdmp:estimate(cts:search((xdmp:document-properties()), "final"))

This searches all properties for the word "final" (a
cts:word-query("final") ) and returns the number of fragments
(properties fragments in this case) that match.  Similarly, you can use
the property axis in an XPath to switch to the properties axis:

xdmp:estimate(//*/property::*[cts:contains(., "final")])

-Danny

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary Vidal
Sent: Wednesday, February 06, 2008 7:52 AM
To: [email protected]
Subject: [MarkLogic Dev General] RE: General Digest, Vol 44, Issue 3

Michael,

It appears that you cannot search the properties axis the same as you
would a node within an xml document.  Is it necessary to create a range
index for each property or is there a way to include property document
in a cts:search. It appears you cannot query the property axis using
search functions.



Gary Vidal
Sr. .Net Developer
Tel: 212-592-4946
[EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 3:00 PM
To: [email protected]
Subject: General Digest, Vol 44, Issue 3

Send General mailing list submissions to
        [email protected]

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
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

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


Today's Topics:

   1. choosing children node (Paul M)
   2. Re: choosing children node (David Sewell)
   3. Storing Binary and Text Data with Metadata (Gary Vidal)
   4. Re: Storing Binary and Text Data with Metadata (Michael Blakeley)


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

Message: 1
Date: Tue, 5 Feb 2008 05:46:14 -0800 (PST)
From: Paul M <[EMAIL PROTECTED]>
Subject: [MarkLogic Dev General] choosing children node
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

let $n:= <doc>
<para>
<g:german>grussgot</g:german>
<english>hello</english>
 Mr Herrman
<g:german>wie gehts</g:german>

<english>how are you today</english>
We missed you at the meeting on Friday
<joke>Well, we missed the good bier that you always bring</joke>
</para>
</doc>

let $msg:=$n//para
return $msg

I only want either the english or the german version children of the
para element. What is the easiest way to implement this? I only can
envision recursively removing german child elements or english child
elements. Is there another more efficient way?







 
________________________________________________________________________
____________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://xqzone.marklogic.com/pipermail/general/attachments/20080205/9beeb
64b/attachment-0001.html

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

Message: 2
Date: Tue, 5 Feb 2008 09:24:01 -0500 (EST)
From: David Sewell <[EMAIL PROTECTED]>
Subject: Re: [MarkLogic Dev General] choosing children node
To: General Mark Logic Developer Discussion
        <[email protected]>
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

On Tue, 5 Feb 2008, Paul M wrote:

> let $n:= <doc>
> <para>
> <g:german>grussgot</g:german>
> <english>hello</english>
>  Mr Herrman
> <g:german>wie gehts</g:german>
>
> <english>how are you today</english>
> We missed you at the meeting on Friday
> <joke>Well, we missed the good bier that you always bring</joke>
> </para>
> </doc>
>
> let $msg:=$n//para
> return $msg
>
> I only want either the english or the german version children of the
> para element. What is the easiest way to implement this? I only can
> envision recursively removing german child elements or english child
> elements. Is there another more efficient way?

let $msg := $n//para/(* except english)
  or
let $msg := $n//para/(* except g:german)

-- 
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: [EMAIL PROTECTED]   Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
-------------- next part --------------
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

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

Message: 3
Date: Tue, 5 Feb 2008 10:40:51 -0500
From: "Gary Vidal" <[EMAIL PROTECTED]>
Subject: [MarkLogic Dev General] Storing Binary and Text Data with
        Metadata
To: <[email protected]>
Message-ID:
        
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

Hi,

 

I am trying to determine a way to associate a metadata xml with a Binary
or Text File.  Such that Binary nodes can be queried by their metadata 

 

 

My initial idea was to wrap the Binary or Text Data in an XmlElement and
store the content as a child node.  But loading this node would require
a custom function instead of using the
ContentSourceFactory.NewContentSource method in the .net API.

I tried to use a custom function but because the file may be quite large
serialization of the document as a base64(adds 30% more to file)  or
hexBinary caused the server to complain about the file being to large.

 

Is there a prescribed method for associating metadata with a binary or
text file that can allow the document to be queried as a single
document? 

 

Since the metadata properties are complex types I don't believe I should
use document-properties as it is inconsistent with our xml strategy
(inserting the node into the document root).

 

Can CPF links be used to associate a file to the binary file and allow
for querying to resolve the binary file?

 

[Example 1]

<sys:binary>

            <sys:metadata/>

            <sys:data>

                        [.Binary Data goes here]

            </sys:data>

</sys:binary>

 

OR

 

lnk:create("source-uri","info-uri","source","related","strong")

 

Please provide some insight?

 

Gary Vidal

Sr. .Net Developer

Tel: 212-592-4946

[EMAIL PROTECTED]

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://xqzone.marklogic.com/pipermail/general/attachments/20080205/40e9f
312/attachment-0001.html

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

Message: 4
Date: Tue, 05 Feb 2008 08:21:30 -0800
From: Michael Blakeley <[EMAIL PROTECTED]>
Subject: Re: [MarkLogic Dev General] Storing Binary and Text Data with
        Metadata
To: General Mark Logic Developer Discussion
        <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="utf-8"

Gary,

This sounds like a good fit for properties: I'd recommend adding your 
metadata XML to the properties of each binary or text document. Chapter 
15 of the developer guide has more information:

   http://developer.marklogic.com/pubs/3.2/books/dev_guide.pdf

-- Mike

Gary Vidal wrote:

> I am trying to determine a way to associate a metadata xml with a
Binary
> or Text File.  Such that Binary nodes can be queried by their metadata


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4532 bytes
Desc: S/MIME Cryptographic Signature
Url :
http://xqzone.marklogic.com/pipermail/general/attachments/20080205/bd459
65e/smime-0001.bin

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

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general


End of General Digest, Vol 44, Issue 3
**************************************
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to