You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Torgeir Veimo <to...@gmail.com> on 2015/02/17 14:14:31 UTC

Re: how do you enable lucene search without OSGi or repository.xml?

This might be a bit late reply for you, but you can use select * from
[nt:base] where lower(*) like '%string%' to search in multiple
properties.

On 23 October 2014 at 02:02, Adrien Lamoureux
<la...@gmail.com> wrote:
> Thanks Davide,
>
> But it turns out that the contains() does not work, (using \"\" seems to
> work fine instead of using []).
>
> So this works:
>
> statement = "select * from [nt:unstructured] as theNode where
> ISDESCENDANTNODE('/searchpath') and myproperty like '%teststring%'"
>
> This does not:
>
> statement = "select * from [nt:unstructured] as theNode where
> ISDESCENDANTNODE('/searchpath') and contains(theNode.*,'teststring')";
>
>
>
> My goal is to search for any node under a certain path, and on any property
> containing a string..,  "myproperty like '%X%' " is cumbersome to use.
>
> Am I using "contains" improperly?
>
> Adrien
>
> On Wed, Oct 22, 2014 at 1:17 AM, Davide Giannella <da...@apache.org> wrote:
>
>> On 21/10/2014 22:08, Adrien Lamoureux wrote:
>> > ...
>> > String statement = "select * from \"nt:unstructured\" as theNode where
>> > ISDESCENDANTNODE('/searchpath') and contains(theNode.*,'teststring')";
>> > ...
>> Shouldn't it be
>>
>> SELECT * FROM [nt:unstructured] AS theNode
>> WHERE ISDESCENDANTNODE('...')
>> AND CONTAINS(...)
>>
>> notice the '[]' rather than the '"'.
>>
>> D.
>>
>>
>>



-- 
-Tor