问题
There are nodes which have properties but no values.
I am trying to avoid those nodes in query builder using,
path=/content/
type=cq:Page
2_property=jcr:content/customProp
2_property.operation=exists
3_property=jcr:content/customProp
3_property.operation=unequals
3_property.value=
But the empty value condition (3_property) is being ignored. How this can be achieved?
回答1:
I had the issue to search for all occurrence of a propertiy with no value. I constructed the following SQL2 Query:
SELECT * FROM [{{jcr:primaryType}}] AS ref WHERE ISDESCENDANTNODE([{{Start Path}}]) AND ref.[{{Property Name}}] = ''
In your case I think something like should work
SELECT * FROM [{{jcr:primaryType}}] AS ref WHERE ISDESCENDANTNODE([{{Start Path}}]) AND NOT(ref.[{{Property Name}}] = '')
来源:https://stackoverflow.com/questions/36140247/aem-how-to-find-the-nodes-with-property-name-customprop-and-empty-property-va