This works as an XPATH query in the repository servlet at /cms/repository, AND as an XPath query for an Updater/Editor script:/jcr:root/content/documents/us-en/products//element(*,mix:versionable)[jcr:contains(@xyz:readOnlyProductUrl, "products/Arbor")]However, if I remove one letter from the end of the jcr:contains match string, it does not throw an error, but returns 0 nodes:/jcr:root/content/documents/us-en/products//element(*,mix:versionable)[jcr:contains(@xyz:readOnlyProductUrl, "products/Arbo")]The actual values of xyz:readOnlyProductUrl look like these:/products/Arbor/subpath/sku/products/Arbor-with.../subpath/skuWhy would the first query work to pull both of the above nodes, but not the 2nd query? What am I missing?
The ultimate goal is to have the query results include only those products under .../products/a*, where a* is all of the next level nodes that start with a.Once the first one worked, I expected to be able to shorten the jcr:contains match string to just "products/A" - no such luck.Any hints/suggestions?
--Thanks in Advance!!
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
On Mon, Apr 23, 2018 at 11:36 AM, Jennifer Amon <vang...@gmail.com> wrote:This works as an XPATH query in the repository servlet at /cms/repository, AND as an XPath query for an Updater/Editor script:/jcr:root/content/documents/us-en/products//element(*,mix:versionable)[jcr:contains(@xyz:readOnlyProductUrl, "products/Arbor")]However, if I remove one letter from the end of the jcr:contains match string, it does not throw an error, but returns 0 nodes:/jcr:root/content/documents/us-en/products//element(*,mix:versionable)[jcr:contains(@xyz:readOnlyProductUrl, "products/Arbo")]The actual values of xyz:readOnlyProductUrl look like these:/products/Arbor/subpath/sku/products/Arbor-with.../subpath/skuWhy would the first query work to pull both of the above nodes, but not the 2nd query? What am I missing?jcr:contains() makes it as full text search query and "Terms separated by whitespace are implicitly “ANDed”. [1] I think that's why.The ultimate goal is to have the query results include only those products under .../products/a*, where a* is all of the next level nodes that start with a.Once the first one worked, I expected to be able to shorten the jcr:contains match string to just "products/A" - no such luck.Any hints/suggestions?In your case, this seems more proper:/jcr:root/content/documents/us-en/products//element(*,mix:versionable)[jcr:like(@xyz:readOnlyProductUrl, "products/A%")]Regards,Woonsan
Thanks in Advance!!
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.