May be part of the confusion is that I am thinking in SQL and you talk about XPATH.
Yes, I usually use xpath, but I noticed that sometimes it's impossible to obtain the query I want either way.
Up to now I found no way to search for pages with a certain paragraph content and use page properties to exclude single pages from beeing found.
I don't know how to translate it in sql, but in xpath it is possible to split the query condition (works in magnolia 3.6.3, don't know in previous versions). You should then try something like this:
//element(*, mgnl:content)[not(@hide) or (@hide eq false())]//element(*, mgnl:contentNode)[jcr:contains(*, 'search')]
I use this in my own search as well, it looks only in paragraphs contained in pages without the given attribute.
I helped myself by filtering the result list. Not nice and certainly a performance blocker on large search results but is works.
I have to do this anyway, and this is my problem: I have to exclude not only a few pages just like this but a few branches (configurable) so I have to post-process all the results and remove the unwanted result, because there isn't any "NOT IN" clause in xpath (and neither in the sql implementation of jackrabbit, as long as I know, but I'd love to be wrong in this case).
By the way not the only perfomance blocker. Even if i have a paging for the search results I have to process the complete list (extract handes, titles and highlighted text snippets) if I do not want to repeat the search each time I am stepping to the next page of results. This is because the jcr session will be closed on the next page request.
Why? If you page the list just extract the snippet in the page, at the next paging just redo the search and extract the snippet only for the pages/results shown.
For the hidden property, do as Ralf said, use defaultValue. Obviously you should save at least once the page dialog, for each page. Or add a startup task that populates the value for all the empty pages that should need it.
Regards, Danilo. ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
