The value of my hippo:name property can have values with underscore in them (first_name). I want to filter a list of files whose hippo:name contains an underscore in them. My filter in my XPAth query is like this [jcr:contains(@hippo:name,"_")] and I dont think the is support for underscore characters.
It seems to work for me, where as jcr:contains doesn’t seem to work very well at all. On a sample data set of News documents (from essentials) I changed a hippo:name to “The medusa_news”
These return 2 documents that end in “news” but only one has “_news”. So I don’t exactly seem to know how jcr:contains works. I gave a query that seemed to work, I disregarded performance.
I think you can append a (more specific) constraint using either jcr:upper-case or jcr:lower-case function. e.g, //element(*)[jcr:like(@myproject:title, '%\_%') and jcr:like(fn:lower-case(@myproject:title), '%bloom_reach%')]
We are happy you are part of Bloomreach Developer’s Community.
Thank you for reaching out to us.
We hope we have answered your queries and therefore marking this thread for Closure.
We are delighted to acknowledge your ongoing contributions to our esteemed Bloomreach Community.