[MarkLogic Dev General] Re: General Digest, Vol 67, Issue 36
Anurag Saxena
anurag24k at gmail.com
Fri Jan 29 14:20:37 PST 2010
Hi Andrew,
thanks for the reply, but the way you have suggested like order by with list
of comma separated elements dosen't seems to be working in right way as per
my requirement.
order by $first, $second
as per my understanding it will first order on $first putting the blank
elements at the end and then it will again re sort the list on $second where
$first values are same. so finally result will be order by $second as it
will overwrite the order of $first.
Please correct me if i am wrong in above.
What i am looking for is order by if first element available, if not then
order by $second. Means conditional order by output should be same as output
of order by single element. both results should be same.
is it achievable in any way in mark logic. Also it will be very helpfull if
you can guide me or point me to some link where i can see how to handle the
blank elements in order by. My requirement is they should always be in the
end of the sorted list irrespective of whether i do the sorting on ascending
or descending order.
Thanks in advance for looking into my query. Any help would be highly
appreciated.
Thanks
Anu
On Thu, Jan 28, 2010 at 7:38 AM, <general-request at developer.marklogic.com>wrote:
> 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. Sorting the search results depending on the elements if
> available (Anurag Saxena)
> 2. Re: Sorting the search results depending on the elements if
> available (Andrew Welch)
> 3. Retrieve Collection name from DB. (kamal ganesh)
> 4. RE: Retrieve Collection name from DB. (Geert Josten)
> 5. RE: change default directory (Geert Josten)
> 6. Understanding Marklogic Server (judie pearline)
> 7. RE: Understanding Marklogic Server (Geert Josten)
> 8. similar query returning same document
> (Whitby, Rob, Springer Healthcare)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 27 Jan 2010 16:30:01 -0500
> From: Anurag Saxena <anurag24k at gmail.com>
> Subject: [MarkLogic Dev General] Sorting the search results depending
> on the elements if available
> To: general at developer.marklogic.com
> Message-ID:
> <bbaf19ea1001271330g39db890o7b5f4f7738d466a9 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I am executing the search query which returns the result and now i need to
> sort them on the basis of condition.......
>
> i need to order by the result if element abc exists in the documents of
> result set, if it dose not exists in the document of result set then order
> by xyz element if it is available in the document.
>
> What it means is i have to sort the result set on the basis of first
> element
> and if it dose not exists then i have to do the sorting on another element.
>
> below scenarios can be available in the data/result set of search.....
>
> 1. Document may have only first element
> 2. Document may have only second element
> 3. document may have both the elements
> 4. document may have none of the element
>
> So sorting should be done on the preference of first element if it is
> available and if not available then sorting should be done on another
> element.
> It means my final output should have sorted result set mixed on the basis
> of
> first and second element on the basis of their respective availability.
>
> Can some body please help me out here (how to achieve the expected
> behavior)
> if you have done it earlier or faced the same situation.
> Also what would be the behavior of document which do not have any of the
> element for ascending and descending condition. means will they come in
> first or last always?
>
> you can assume that my search is working perfectly fine and i just need to
> add the order by clause.
>
>
> Thanks
> Anu
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://xqzone.marklogic.com/pipermail/general/attachments/20100127/cc8a01d5/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Thu, 28 Jan 2010 10:57:28 +0000
> From: Andrew Welch <andrew.j.welch at gmail.com>
> Subject: Re: [MarkLogic Dev General] Sorting the search results
> depending on the elements if available
> To: General Mark Logic Developer Discussion
> <general at developer.marklogic.com>
> Message-ID:
> <74a894af1001280257j37b31171va3b3673f3d812cb5 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> You just list the things to order by in the order by clause, seperated
> by a comma:
>
> order by $first, $second
>
> It's designed to work exactly as you need.
>
> cheers
> andrew
>
> On 27 January 2010 21:30, Anurag Saxena <anurag24k at gmail.com> wrote:
> > Hi,
> >
> > I am executing the search query which returns the result and now i need
> to
> > sort them on the basis of condition.......
> >
> > i need to order by the result if element abc exists in the documents of
> > result set, if it dose not exists in the document of result set then
> order
> > by xyz element if it is available in the document.
> >
> > What it means is i have to sort the result set on the basis of first
> element
> > and if it dose not exists then i have to do the sorting on another
> element.
> >
> > below scenarios can be available in the data/result set of search.....
> >
> > 1. Document may have only first element
> > 2. Document may have only second element
> > 3. document may have both the elements
> > 4. document may have none of the element
> >
> > So sorting should be done on the preference of first element if it is
> > available and if not available then sorting should be done on another
> > element.
> > It means my final output should have sorted result set mixed on the basis
> of
> > first and second element on the basis of their respective availability.
> >
> > Can some body please help me out here (how to achieve the expected
> behavior)
> > if you have done it earlier or faced the same situation.
> > Also what would be the behavior of document which do not have any of the
> > element for ascending and descending condition. means will they come in
> > first or last always?
> >
> > you can assume that my search is working perfectly fine and i just need
> to
> > add the order by clause.
> >
> >
> > Thanks
> > Anu
> >
> > _______________________________________________
> > General mailing list
> > General at developer.marklogic.com
> > http://xqzone.com/mailman/listinfo/general
> >
> >
>
>
>
> --
> Andrew Welch
> http://andrewjwelch.com
> Kernow: http://kernowforsaxon.sf.net/
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 28 Jan 2010 16:35:01 +0530
> From: kamal ganesh <kamalaganesh.c at gmail.com>
> Subject: [MarkLogic Dev General] Retrieve Collection name from DB.
> To: general at developer.marklogic.com
> Message-ID:
> <304ecd841001280305r444bd78erad1dee3ca3ae658d at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi All,
>
>
> I am beginner of MarkLogic. I am working with collections now.
>
> I am wondering is there any API to list all Collection in the database?
> Like "fn:Doc()" to list all documents in DB, Is there any possible way
> to retrieve all collection name within a specified DB?
>
> Thanks in Advance.
>
> Regards,
> Kamalaganesh.C
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://xqzone.marklogic.com/pipermail/general/attachments/20100128/bb14216d/attachment-0001.html
>
> ------------------------------
>
> Message: 4
> Date: Thu, 28 Jan 2010 12:08:19 +0100
> From: Geert Josten <Geert.Josten at daidalos.nl>
> Subject: RE: [MarkLogic Dev General] Retrieve Collection name from DB.
> To: General Mark Logic Developer Discussion
> <general at developer.marklogic.com>
> Message-ID:
> <
> 0260356C6DFE754BA6FA48E659A143384700DDFCF5 at helios.olympus.borgus.nl>
> Content-Type: text/plain; charset="Windows-1252"
>
> Hi Kamal,
>
> I think cts:collections might help you out..
>
>
> http://developer.marklogic.com/pubs/4.1/apidocs/Lexicons.html#cts:collections
>
> 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: general-bounces at developer.marklogic.com
> > [mailto:general-bounces at developer.marklogic.com] On Behalf Of
> > kamal ganesh
> > Sent: donderdag 28 januari 2010 12:05
> > To: general at developer.marklogic.com
> > Subject: [MarkLogic Dev General] Retrieve Collection name from DB.
> >
> > Hi All,
> >
> >
> > I am beginner of MarkLogic. I am working with collections now.
> >
> > I am wondering is there any API to list all Collection in the
> > database?
> > Like "fn:Doc()" to list all documents in DB, Is there any
> > possible way to retrieve all collection name within a specified DB?
> >
> > Thanks in Advance.
> >
> > Regards,
> > Kamalaganesh.C
> >
>
>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 28 Jan 2010 12:30:09 +0100
> From: Geert Josten <Geert.Josten at daidalos.nl>
> Subject: RE: [MarkLogic Dev General] change default directory
> To: General Mark Logic Developer Discussion
> <general at developer.marklogic.com>
> Message-ID:
> <
> 0260356C6DFE754BA6FA48E659A143384700DDFCF9 at helios.olympus.borgus.nl>
> Content-Type: text/plain; charset="Windows-1252"
>
> Hi Arpitha,
>
> Isn't that described in the installation guide?
>
> http://developer.marklogic.com/pubs/4.1/books/install.pdf
>
> 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: general-bounces at developer.marklogic.com
> > [mailto:general-bounces at developer.marklogic.com] On Behalf Of
> > Arpitha Chittumalla
> > Sent: woensdag 27 januari 2010 13:27
> > To: general at developer.marklogic.com
> > Subject: [MarkLogic Dev General] change default directory
> >
> > Hi All,
> > How to change the default directory for installing marklogic.
> > thank you in advance.
> > _______________________________________________
> > General mailing list
> > General at developer.marklogic.com
> > http://xqzone.com/mailman/listinfo/general
> >
>
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 28 Jan 2010 17:12:04 +0530 (IST)
> From: judie pearline <jj_judie at yahoo.co.in>
> Subject: [MarkLogic Dev General] Understanding Marklogic Server
> To: Mark Logic <general at developer.marklogic.com>
> Message-ID: <701350.93899.qm at web94408.mail.in2.yahoo.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> We understand that markLogic product comes with default webserver.
> Is there any document or link available to know more detail about default
> webserver implementation.
>
> Regards,
> Judie
>
>
> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
> http://in.yahoo.com/
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://xqzone.marklogic.com/pipermail/general/attachments/20100128/2465de15/attachment-0001.html
>
> ------------------------------
>
> Message: 7
> Date: Thu, 28 Jan 2010 13:32:37 +0100
> From: Geert Josten <Geert.Josten at daidalos.nl>
> Subject: RE: [MarkLogic Dev General] Understanding Marklogic Server
> To: General Mark Logic Developer Discussion
> <general at developer.marklogic.com>
> Message-ID:
> <
> 0260356C6DFE754BA6FA48E659A143384700DDFD0B at helios.olympus.borgus.nl>
> Content-Type: text/plain; charset="Windows-1252"
>
> Hi Judie,
>
> > We understand that markLogic product comes with default webserver.
> > Is there any document or link available to know more detail
> > about default webserver implementation.
>
> Have you read the intro? You might want to start with that for a quick
> general impression of MarkLogic Server overall:
>
> http://developer.marklogic.com/howto/tutorials/technical-overview.xqy
>
> Followed by the getting started guide if you like:
>
> http://developer.marklogic.com/pubs/4.1/books/gs.pdf
>
> Straight forward information on HTTP servers in MarkLogic Server can be
> found in chapter 6 of the Administrators guide:
>
> http://developer.marklogic.com/pubs/4.1/books/admin.pdf
>
> Additional information for more advanced customization of such servers can
> be found in chapter 15 of the Application developers guide:
>
> http://developer.marklogic.com/pubs/4.1/books/dev_guide.pdf
>
> Plenty more documentation can be found here (as well as tutorials on
> several topics if you follow the Tutorial Index link on the right hand
> side):
>
> http://developer.marklogic.com/pubs/
>
> 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.
>
>
>
>
>
> ------------------------------
>
> Message: 8
> Date: Thu, 28 Jan 2010 12:37:29 -0000
> From: "Whitby, Rob, Springer Healthcare"
> <Rob.Whitby at currentmedicinegroup.com>
> Subject: [MarkLogic Dev General] similar query returning same document
> To: "General Mark Logic Developer Discussion"
> <general at developer.marklogic.com>
> Message-ID:
> <
> 214A288F8F3BA84EA8462E02B14399698BE61A at SEGBLOGR0008.springer-sbm.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi
>
>
>
> I'm getting odd results from cts:similar-query where the first result it
> returns is the same document:
>
>
>
> let $uri := '/test.xml'
>
> let $similar := fn:document-uri(cts:search(fn:collection(),
> cts:similar-query(fn:doc($uri)))[1])
>
> return (
>
> $uri,
>
> $similar,
>
> fn:compare($uri, $similar)
>
> )
>
>
>
> ==>
>
>
>
> /test.xml
>
> /test.xml
>
> 0
>
>
>
>
>
> Any ideas?
>
>
>
> Thanks
>
> Rob
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://xqzone.marklogic.com/pipermail/general/attachments/20100128/0e1a10cb/attachment.html
>
> ------------------------------
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
>
>
> End of General Digest, Vol 67, Issue 36
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20100129/cfae7d45/attachment-0001.html
More information about the General
mailing list