I was attempting to use an element without transforming it. However, this 
element may contain two different "views" of the same content 
(<elem><view1/><view2/>). So one would get duplicate data in the facet. In 
addition to white space issues as you alluded to...some child elements may have 
white space, others may not.

Thanks on the info though.

--- On Fri, 11/6/09, [email protected] 
<[email protected]> wrote:

From: [email protected] 
<[email protected]>
Subject: General Digest, Vol 65, Issue 16
To: [email protected]
Date: Friday, November 6, 2009, 12:00 PM

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. Re: RE: effectively constraining a cts:search (Mike Sokolov)
   2. Typo in doc (Florent Georges)
   3. Re: RE: Unit testing (Micah Dubinko)
   4. RE: RE: effectively constraining a cts:search (Geert Josten)
   5. is Thesaurus integrated with search module    in ML?
      (Srinivas Mandadapu)
   6. facets, children, collation (Paul M)
   7. Re: effectively constraining a cts:search (Frank Rubino)


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

Message: 1
Date: Fri, 06 Nov 2009 11:44:42 -0500
From: Mike Sokolov <[email protected]>
Subject: Re: [MarkLogic Dev General] RE: effectively constraining a
    cts:search
To: General Mark Logic Developer Discussion
    <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"

Geert's suggestion would be useful for finding books, but not 
paragraphs, I think.

Have you tried

cts:search(//book[year='1959']//p, cts:element-word-query 
(xs:QName("p"), "content")) ?

-Mike

Geert Josten wrote:
> Hi Cliff,
>
> I would say that two element queries joined by a and-query would be the way 
> to go. Did you try that? Something like:
>
> cts:and-query((cts:element-word-query(xs:Qname("year"), "1959"), 
> cts:element-word-query(xs:Qname("p"), "content")))
>
> Kind regards,
> Geert
>
>   
>
>
> Drs. G.P.H. Josten
> Consultant
>
>
> http://www.daidalos.nl/
> Daidalos BV
> Source of Innovation
> Hoekeindsehof 1-4
> 2665 JZ Bleiswijk
> Tel.: +31 (0) 10 850 1200
> Fax: +31 (0) 10 850 1199
> http://www.daidalos.nl/
> KvK 27164984
> De informatie - verzonden in of met dit emailbericht - is afkomstig van 
> Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
> bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
> bericht kunnen geen rechten worden ontleend.
>
>
>   
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of
>> Anderson, Dr. Clifford
>> Sent: vrijdag 6 november 2009 15:30
>> To: [email protected]
>> Subject: [MarkLogic Dev General] effectively constraining a cts:search
>>
>> I wonder if someone could suggest the most efficient way to
>> query a set of documents where a desired constraint exists
>> outside the element being queried.
>>
>>
>>
>> For example, take:
>>
>>
>>
>> <book>
>>     <title>Sample</title>
>>     <year>1959</year>
>>     <content>
>>         <p>some content</p>
>>         <p>more content</p>
>>     </content>
>> </book>
>>
>>
>>
>> How would I write an effective cts:search for "p" elements
>> containing the word "more," with a constraint on book
>> documents with a "year" element value of 1959? My goal is to
>> bring back only p elements, not whole book documents. I've
>> tried to accomplish this in several ways, but none seem very
>> efficient. Can someone point me in the right direction?
>>
>>
>>
>> Thanks!
>>
>>
>> Cliff
>>
>>
>>
>> Clifford Anderson
>>
>> Curator of Special Collections
>>
>> Princeton Theological Seminary Libraries
>>
>> 609-497-3642 (phone)
>>
>> 609-497-1826 (fax)
>>
>>
>>     
>
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://xqzone.marklogic.com/pipermail/general/attachments/20091106/a52fbaf2/attachment-0001.html

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

Message: 2
Date: Fri, 6 Nov 2009 16:54:33 +0000 (GMT)
From: Florent Georges <[email protected]>
Subject: [MarkLogic Dev General] Typo in doc
To: MarkLogic General ML <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

Typo in Search Developer's Guide

  Hi,

  In the Search Developer's Guide 4.1, the section 1.1.3 "Full
XPath Search Support" contains:

    /my-node/my-child[fn:contains(., "hello"]

  Note the missing closing paren.  Regards,

-- 
Florent Georges
http://www.fgeorges.org/






















      



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

Message: 3
Date: Fri, 6 Nov 2009 09:01:44 -0800
From: Micah Dubinko <[email protected]>
Subject: Re: [MarkLogic Dev General] RE: Unit testing
To: "[email protected]" <[email protected]>,    General Mark Logic
    Developer Discussion <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Yeah, I was just about to send out a note about Jeni's xspec, which  
looks useful, though I haven't had time to dig deep yet. I need to  
check this and xslt-unit out when I get a chance...

-m

On Nov 6, 2009, at 8:36 AM, Florent Georges wrote:

>  I think there is real potential in the approach I followed in
> XTC <http://www.fgeorges..org/xslt/xslt-unit/> or Jeni Tennison
> does follow in XSpec <http://code.google.com/p/xspec/>: a
> declarative XML language to represent the unit tests themselves,
> which is transformed to an XQuery (or XSLT in those cases) that
> represents the test execution.  The generation of this query can
> add all the tooling necessary to generate the final report.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general



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

Message: 4
Date: Fri, 6 Nov 2009 18:13:05 +0100
From: Geert Josten <[email protected]>
Subject: RE: [MarkLogic Dev General] RE: effectively constraining a
    cts:search
To: General Mark Logic Developer Discussion
    <[email protected]>
Message-ID:
    <0260356c6dfe754ba6fa48e659a14338416c13b...@helios.olympus.borgus.nl>
Content-Type: text/plain; charset="Windows-1252"

> Geert's suggestion would be useful for finding books, but not
> paragraphs, I think.

Point taken. Apparently I have read only half the question..

;-)



Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.





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

Message: 5
Date: Fri, 06 Nov 2009 14:11:59 -0500
From: Srinivas Mandadapu <[email protected]>
Subject: [MarkLogic Dev General] is Thesaurus integrated with search
    module    in ML?
To: General Mark Logic Developer Discussion
    <[email protected]>
Cc: Geert Josten <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed

I haven't found anything in this regards and would like to know if 
Thesaurus is integrated with search module in ML 4.1!!?

I really appreciate your help.

Thanks,
Srini


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

Message: 6
Date: Fri, 6 Nov 2009 11:19:18 -0800 (PST)
From: Paul M <[email protected]>
Subject: [MarkLogic Dev General] facets, children, collation
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

<myfacet><child1>data1</child1>child2>data2</child2>more!Data</myfacet>

When a range index is created on the above node, it appears that a simple 
"fn:data" is used on myfacet.i.e. all text nodes and children text nodes are 
rolled up. 
So it is the same as follows
<myfacet>data1data2more!Data</myfacet>
Is this true?
 What happens with different  collations? Punctuation, white-space gotchas?





      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://xqzone.marklogic.com/pipermail/general/attachments/20091106/77b4cb50/attachment-0001.html

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

Message: 7
Date: Fri, 6 Nov 2009 11:19:55 -0800
From: Frank Rubino <[email protected]>
Subject: Re: [MarkLogic Dev General] effectively constraining a
    cts:search
To: General Mark Logic Developer Discussion
    <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="Windows-1252"

Hi Cliff- sounds like you are digging into full text search. Did you  
try:

fragment parent book
element range index on year
field "myField" on p

(cts:search(doc(),  cts:and-query((cts:element-range-query(xs:QName 
("year"), "=", xs:integer(1959)), cts:field-word-query("myField", "my  
phrase")))//p[cts:contains(., "my phrase")])[1 to 10]

You might have to check syntax but this is an approach, albeit the  
first one that popped into my head. There are some caveats about it,  
including:

This is essentially an unfiltered search with cts:contains doing the  
filtering. This is going to complicate counting results, and may  
impact performance.

Depending on how you want to present the results you may need to  
optimize in that area as well. For instance, if your presentation  
strategy includes running cts:highlight on an entire book, you may  
have performance problems.

I would advise you to avoid hand-building this sort of query. I  
believe you are running 4.1. Have you looked into application services  
and the search apis? That provides optimized query creation and  
results formatting; you create queries using an xml options object and  
you submit this object with a simple api call.

The details are in 
http://developer.marklogic.com/pubs/4.1/books/search-dev-guide.pdf 
.

Hope all is well!
Frank

On Nov 6, 2009, at 9:29 AM, Anderson, Dr. Clifford wrote:

> I wonder if someone could suggest the most efficient way to query a  
> set of documents where a desired constraint exists outside the  
> element being queried.
>
> For example, take:
>
> <book>
>    <title>Sample</title>
>    <year>1959</year>
>    <content>
>        <p>some content</p>
>        <p>more content</p>
>    </content>
> </book>
>
> How would I write an effective cts:search for “p” elements  
> containing the word “more,” with a constraint on book documents with  
> a “year” element value of 1959? My goal is to bring back only p  
> elements, not whole book documents. I’ve tried to accomplish this in  
> several ways, but none seem very efficient. Can someone point me in  
> the right direction?
>
> Thanks!
>
> Cliff
>
> Clifford Anderson
> Curator of Special Collections
> Princeton Theological Seminary Libraries
> 609-497-3642 (phone)
> 609-497-1826 (fax)
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general



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

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


End of General Digest, Vol 65, Issue 16
***************************************



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

Reply via email to