jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: Query contains question
Date Wed, 11 Aug 2010 15:38:41 GMT
On Wed, Aug 11, 2010 at 5:27 PM, Simon Gaeremynck <gaeremyncks@gmail.com> 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
>

Mime
View raw message