jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius" <dbros...@mebigfatguy.com>
Subject RE: Problem searching contents of a node
Date Fri, 04 Apr 2008 19:25:05 GMT
I believe you need to issue the contains on the nt:resource node itself, not 
the property

//element(*, nt:resource)[jcr:contains(., 'repositoryTemplate')]


----- Original Message ----- 
From: "Anand Bhagwat" <abbhagwatgm@gmail.com>
To: <users@jackrabbit.apache.org>
Sent: Friday, April 04, 2008 4:07 AM
Subject: Problem searching contents of a node


> Hi,
> I have just started using jackrabbit and I have added couple of nodes in
> repository. The node I am adding is of type "nt:file" with content 
> sub-node
> of type "nt:resource" and I am adding all the mandatory properties
> mime-type, encoding, data as well as lastModified. But the problem is that
> my query is not returning results on contents i.e. its not searching text 
> in
> the file.  The query I am using is
>
> Query:
> //element(*, nt:resource)[jcr:contains(@jcr:data, 'repositoryTemplate')]
>
> I have set encoding as "UTF-8" and mime-type as "text/*".
>
> I have also set textFilterClasses in repository as well as workspace.xml
> file.
> <param name="textFilterClasses"
> value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,
> org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,
> org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,
> org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
>
>
> Do I need to do anything for this query to work?
>
> Regards,
> Anand.
> 




Mime
View raw message