We're on 2.1.0 . I probably can't use jcr:like as that needs a specific property and I need it to match on all the properties on a node.
Cheers, Simon On 11 Aug 2010, at 17:38, Ard Schrijvers wrote: > On Wed, Aug 11, 2010 at 5:27 PM, Simon Gaeremynck <[email protected]> > wrote: >> Thanks Ard, >> I think I'm getting closer. >> >> The following matches the node I want >> jcr:contains(., '"Anne-Sophie"') >> >> This however doesn't match anything >> jcr:contains(., '"Anne-S*"') > > Which version do you use? It works for me, although it might have > changes as it is not part of the spec. You can use jcr:like, that is > part of the spec > > Regards ARd > >> >> Regards, >> Simon >> >> >> On 11 Aug 2010, at 15:07, Ard Schrijvers wrote: >> >>> For this thing you can use jcr:like or use >>> //*[jcr:contains(.,'"Anne-S*"')] although I am not completely sure if >>> the latter always works. The problem you have is that you cannot >>> search for terms starting with 'Anne-S' as there are no Lucene terms >>> starting with it! This is because the standard lucene analyzer >>> tokenizes on a dash, hence, there is for example the term 'Anne' and >>> 'Sophie'. Check 'Ann*', that one will work! This might be >>> confusing..but it gets even much more complex when iso latin1 filters >>> and stemming is applied. >>> >>> Anyway, back to the '"Anne-S*"'. When putting " " around it, it will >>> be treated as a Lucene PhraseQuery [1] which does the job for you (I >>> think/hope :) ) >>> >>> Regards Ard >>
