On Fri, Dec 4, 2009 at 9:51 AM, ulf schneider <[email protected]> wrote:
> hi,
> i have a question regarding fulltext search and node paths containing spaces.
>
> if i use the following query, any node that contains the string 'text' will
> be found inside the subtree of /Allgemeine_Dokumente
>
> /jcr:root/Allgemeine_Dokumente//*[jcr:contains(., 'text')]
>
> if i do the same search but against a path that contains a space (/Allgemeine
> Dokumente) no node will be found.
> /jcr:root/Allgemeine Dokumente//*[jcr:contains(., 'text')]
>
> is there a chance to escape spaces in fulltext queries so that the fulltext
> search will find content that is stored inside of subtrees with spaces in the
> path?
in fulltext searches, spaces are 'escaped' (obviously the real thing
is that lucene analyzer tokenizes on a space). What you are referrring
to is not a space in fulltext search (fulltext search is the
jcr:contains), but in the child axis : /jcr:root/Allgemeine Dokumente
You need to encode Allgemeine Dokumente :
ISO9075.encode("Allgemeine Dokumente")
Regards Ard
>
> best regards, ulf.
>
> --
> ulf schneider
> +49 163 2505164
> [email protected]
>
> datenlabor gmbh
> sitz: paderborn, hrb 8819
> geschäftsführer: ulf schneider
> www.datenlabor.net
> ibm business partner
>
>
>
>
>
>