Thanks every one for your answers (Danilo for answering my second question right before I posted it). The mentiond XPATH query and ist sql anaolg worked fine.
There is just one unexpected porblem: I dont want the content editors to set the notSearchable-property. Thus I added a hidden Boolean fild with the value true to the Dialog of the paragraph. However the value is not written to the content repository and contents are still found :-( If I use a checkboxSwitch everything worked fine. Is this the default behaviour of the hidden dialog controll, a bug or did i do something wrong? Greetings Wolf -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Danilo Ghirardelli Gesendet: Freitag, 23. Januar 2009 23:15 An: Magnolia User-List Betreff: Re: [magnolia-user] Jcr queries: 2 questions on how to exclude nodes Sorry to post again but I didn't see this mail in the mailing list, so I think it's either lost or I have a problem with mail server... > 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]> ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
