Hi Sachin,

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


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 


 on behalf of rohan SHARMA <rs51...@gmail.com<mailto:rs51...@gmail.com>>
Reply-To: MarkLogic Developer Discussion 
Date: Thursday, September 22, 2016 at 11:20 AM
To: "General@developer.marklogic.com<mailto:General@developer.marklogic.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.

Sachin Sharma
General mailing list
Manage your subscription at: 

Reply via email to