Hi Sachin,

Deep-equal takes a third parameter, which is the collation to use. You can use 
collations to ignore case:

http://docs.marklogic.com/fn:deep-equal

Docs can elaborate on collations, but I typically use Admin UI range index 
creation which has a collation builder. Build the collation you need, pass it 
as string as 3rd param to deep-equal, and you should get what you are looking 
for..

Cheers,
Geert

From: 
<general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>>
 on behalf of rohan SHARMA <rs51...@gmail.com<mailto:rs51...@gmail.com>>
Reply-To: MarkLogic Developer Discussion 
<general@developer.marklogic.com<mailto:general@developer.marklogic.com>>
Date: Thursday, September 22, 2016 at 11:20 AM
To: "General@developer.marklogic.com<mailto:General@developer.marklogic.com>" 
<General@developer.marklogic.com<mailto:General@developer.marklogic.com>>, 
"shirishagu...@gmail.com<mailto:shirishagu...@gmail.com>" 
<shirishagu...@gmail.com<mailto:shirishagu...@gmail.com>>
Subject: [MarkLogic Dev General] Case Insensitive Comparison of String Array

Hi Team,

           I want to perform case insensitive comparison of 2 array sequence in 
XQuery .

deep-equal( ("1", "sd"), ("1", "SD") ) will result in false.
Actually both values sd and SD are same


I have gone through various methods such as deep equal or converting both 
sequence to lower or upper case and then compare or looping both array to 
perform conversion.

I am running these operations on huge data .These operations are inefficient on 
huge datasets with  often throws time out error or crashing of application.

In java ,we have method deepEqualsIgnoreCase() for case insensitive comparison 
of string array.

So kindly suggest some way or any function which will compare 2 string arrays 
based on case insensitivity.

Any help is appreciated.

Regards
Sachin Sharma
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to