You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Rencana Tarigan <re...@yahoo.co.id> on 2010/07/02 04:44:57 UTC

Re: Search Query

How to make it work for sub folder too ?

On 6/30/2010 6:43 PM, David Gough wrote:
> Hi Rencana,
>
> Try
>
> //element(*, nt:file)[jcr:contains(jcr:
>    
>> path, '//"searchText"')]
>>
>>      
> or failing that:
>
> //element(*, nt:file)[jcr:like(jcr:
>    
>> path, '//"*searchText*"')]
>>
>>      
> regards
>
> Dave
>
>
>
> On Mon, Jun 21, 2010 at 4:41 PM, Rencana Tarigan<
> rencana_tarigan@yahoo.co.id>  wrote:
>
>    
>> I have path /cana.txt but when i use this query the result is empty..
>> //element(*, nt:file)[jcr:contains(jcr:path, '//"+searchText+"')]
>> can somebody tell me what is wrong with this query ?
>>
>>
>> On 6/21/2010 8:15 PM, Justin Edelson wrote:
>>
>>      
>>> http://wiki.gxdeveloperweb.com/confluence/display/GXDEV/XPath+JCR+Sample+Queries
>>>
>>> has some good sample xpath queries.
>>>
>>> Justin
>>>
>>> On Jun 21, 2010, at 8:24 AM, Rencana Tarigan wrote:
>>>
>>>
>>>
>>>        
>>>> Hi, can someone give me example for query using xpath or sql in
>>>> jackrabbit..
>>>> for example i want get a result that the content contains "text" and path
>>>> like %text% so the result will :
>>>> result1.txt<-- this file contains "text"
>>>> atext.doc
>>>> texta.doc
>>>> atexta.doc
>>>>
>>>> Thanks...
>>>>
>>>> --
>>>> -----=====*=====-----
>>>> Rencana Tarigan
>>>> +6285270567856
>>>> YM   : rencana_tarigan
>>>> Skype: rencana.tarigan
>>>> http://cana.web.id
>>>>
>>>>
>>>>
>>>>          
>>>
>>>
>>>
>>>        
>>      
>