rainer wrote:
if i search for CONTAINS(*, 'foo') i also get the 'fooooooo' hits, cause
'foooooo' contains 'foo' (am i wrong?)

contains simply runs the query words through an analyzer and compares them with the tokens in the index. fooooo and foo are therefore not the same and will not yield a match.

and u say this is incorrect behaviour??

or your observation is incorrect ;) maybe there are other properties on that node that contain the term foo.

is "%" or "*" the correct wildcard here?

if you are refering to the first argument of the contains function in a SQL query then * is the correct 'wildcard'. it indicates that the function should take all properties into account.

the second argument of the contains function may also contain wildcards (but this is jackrabbit proprietary and not specified in jsr 170).
CONTAINS(*, 'foo*') matches all properties that contain terms that start with 
'foo'.

BTW is a "/" kind of special character in JCR queries? i get some strange
behaviour sometimes...

yes, it separates elements of a path

regards
 marcel

Reply via email to