Hi All,
I have added a field ‘title’ in my document and it stores string values. I am using ‘jcr:contains’ xpath query to fetch the results on this field. But it fails to retrieve results when provide following combinations:
-
when my title is ‘UMA’
and I try:
//*[jcr:contains(@brxp:title,‘UMA’)] --> No result -
when my title is ‘UMA example’
and I try:
//[jcr:contains(@brxp:title,‘UMA’)] --> No result
//[jcr:contains(@brxp:title, ‘UMA example’)] --> No result
//*[jcr:contains(@brxp:title, ‘example’)] --> gets the result -
when my title is ‘example UMA’
and I try:
//[jcr:contains(@brxp:title,‘UMA’)] --> No result
//[jcr:contains(@brxp:title,example UMA’)] --> No result
//*[jcr:contains(@brxp:title, ‘example’)] --> gets the result -
when my title is ‘example UMA example’
and I try:
//[jcr:contains(@brxp:title,UMA’)] --> No result
//[jcr:contains(@brxp:title,example UMA’)] --> No result
//[jcr:contains(@brxp:title, ‘UMA example’)] --> No result
//[jcr:contains(@brxp:title, ‘example’)] --> gets the result
//*[jcr:contains(@brxp:title, ‘example UMA example’)] --> gets the result
Ideally, it should fetch result for all of the above query and it does so when i replace ‘UMA’ with any other word.
Can someone pls explain this strange behavior? Also in my case the title will end with ‘UMA’ word and how to get this working?
Thanks
Rahul