Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.8
-
None
-
None
Description
Usecase :
We need to make search on Name and AuthorizableId while searching for users. Hence we used the 'named'[0] token while creating the json. But we realized that 'named' token doesn't support the ignore case feature due to which our search is failing. Can you please include an option to enable/disable the ignore case functionality.
I have found a similar jira[1] reported earlier for the sort option.
Sample Query :
select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where isdescendantnode(a, '/home') and contains([rep:principalName], 'rohan.raj@sandisk.com*')
union select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where isdescendantnode(a, '/home') and contains([cq:first-name], 'rohan.raj@sandisk.com*')
union select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where isdescendantnode(a, '/home') and contains([cq:last-name], 'rohan.raj@sandisk.com*')
union select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where isdescendantnode(a, '/home') and contains([profile/givenName], 'rohan.raj@sandisk.com*')
union select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where isdescendantnode(a, '/home') and contains([profile/familyName], 'rohan.raj@sandisk.com*')
union select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where isdescendantnode(a, '/home') and [rep:authorizableId] like 'rohan.raj@sandisk.com'
union select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where isdescendantnode(a, '/home') and [rep:principalName] like 'rohan.raj@sandisk.com'
union select [jcr:path], [jcr:score], * from [rep:Authorizable] as a where isdescendantnode(a, '/home') and name(a) like 'rohan.raj@sandisk.com'
order by lower([rep:principalName]
The name(a) like 'rohan.raj@sandisk.com' doesn't honor the ignorecase.
Sample Calling :
public Iterator<Authorizable> execute(final String query) throws RepositoryException, IOException {
try {
return userManager.findAuthorizables(new Query(){
public <T>void build( QueryBuilder<T> builder){
try
catch ( IOException e)
{ throw new IllegalArgumentException(e); } }
}
);
}
catch ( IllegalArgumentException e) {
Throwable cause=e.getCause();
if (cause instanceof IOException)
else
{ throw e; } }
}