On Wed, Aug 14, 2013 at 10:10 AM, Edwin B. <
ett...@gmail.com> wrote:
> Hi,
>
> I'm trying to retrieve all documents of a specific documenttype
> (mynamespace:mydoctype) that do NOT live in some content-folders.
>
> To find all these documents I can run:
> [1] SELECT * FROM mynamespace:mydoctype
>
> To find all documents in a certain folder I can run:
> [2] SELECT * FROM mynamespace:mydoctype WHERE jcr:path LIKE
> '/content/documents/myproject/path/to/folder/%'
These kind of queries tend to be very expensive in Jackrabbit. You can
better use our hippo:paths property to exclude/include parts of the
tree. This also enables you to include / exclude multiple scopres as
well.
Are you familiar with the HST? The HST Query api lets you easily
create queries in java and you can look at the xpath string
representation then as well. Those are though xpath queries instead of
sql
Regards Ard
>
> But now I want to exclude all the results from [2] from the total results
> [1], using the NOT LIKE-statement:
> [3a] SELECT * FROM mynamespace:mydoctype WHERE jcr:path NOT LIKE
> '/content/documents/myproject/path/to/myfolder/%'
> or
> [3b] SELECT * FROM mynamespace:mydoctype WHERE NOT jcr:path LIKE
> '/content/documents/myproject/path/to/myfolder/%'
>
> Unfortunately, this is not working and does return the same results as [2].
>
> Anyone an idea how to get the mydoctype-documents outside the "my
> folder"-folder?
>
>
> Best regards,
> Edwin
>
> --
> Hippo Community Group: The place for all discussions and announcements about
> Hippo CMS (and HST, repository etc. etc.)
> Most Hippo developers are active here and/or follow the Stackoverflow
> [hippo-cms] tag.
>
> The old Nabble archive can be found here:
>
http://hippo.2275632.n2.nabble.com/Hippo-CMS-7-f2274273.html
>
> To post to this group, send email to
hippo-c...@googlegroups.com
> RSS:
>
https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google Groups
> "Hippo Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
hippo-communi...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/hippo-community.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142
US
+1 877 414 4776 (toll free)
Europe
+31(0)20 522 4466
www.onehippo.com