I have a document type with a property firstname. The document repository should be filtered/queried by a HTML form input parameter. I am having trouble setting up an HstQuery and Filters, i.e. addContains() or addLike() do not behave as expected. I tried various XPath expressions and JCR SQL queries which seemingly are not supported anyway.
Let’s say there is a document containing ‘theo’ in the firstname property.
Using the Repository servlet the following queries do not work:
//*[@hippostd:state = 'published' and jcr:like(@starterstoreboot:firstname,'%theo%')] //*[@hippostd:state = 'published' and jcr:contains(@starterstoreboot:firstname,'the')]
The first query only works if ‘theo’ is reduced to ‘he’, most likely so that the % will match a char at the start/end of the property value and produce a result. The second query only works for an exact match ‘theo’ but not a partial match.
How should a substring / partial match against document contents be implemented properly in brxm? I have tried all combinations I could think of but without any luck.
Thanks in advance,