I tried the XPATH analog
/jcr:root/content[1]//element(*, mgnl:contentNode)[jcr:contains(.,
'something') and not(jcr:contains(@hideInNav, 'true'))] order by
@jcr:score descending
with the same result. At least this is fine :-)
If the property is stored as boolean the condition should be like this:
/jcr:root/content[1]//element(*, mgnl:content)[jcr:contains(.,
'something') and (not(@hideInNav) or (@hideInNav eq false()))] order by
@jcr:score descending
It seems really strange: the "not(@hideInNav)" means that the property
should be null (for those pages without this property, if they should be
shown), and the "eq false()" really needs the "()" after the false, they
are part of the sintax, because this is a function that returns the
false value.
Also I noticed that you wrote about "pages", but the original query was
looking for paragraphs (mgnl:contentNode). Check what are you looking for...
2) Can I exclude some paragraphs from beeing searched? How would such a
query string look like? Is there a better solution than providing (a
long) white list of node names to search in?
I think the query I wrote above should be right, but you should try
adding one condition at time and see if everything is ok.
Greeting, Danilo.
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------