jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Gaeremynck <gaeremyn...@gmail.com>
Subject Re: Query contains question
Date Wed, 11 Aug 2010 15:27:22 GMT
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*"')


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

View raw message