You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by freak182 <em...@gmail.com> on 2009/08/26 12:24:03 UTC
how to search images (*.jpg, *.png)
Hello,
How can I search images in the JR repository? I put this exrtractor:
org.apache.jackrabbit.extractor.PngTextExtractor and uploaded a .png & .jpg
file and try search using this query:
"/jcr:root/photo/upload/username//element(*,nt:base)[fn:lower-case(@type)='jpg']"
i do not get any hits. any idea.
Thanks a lot.
Cheers.
--
View this message in context: http://www.nabble.com/how-to-search-images-%28*.jpg%2C-*.png%29-tp25150156p25150156.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: how to search images (*.jpg, *.png)
Posted by freak182 <em...@gmail.com>.
hello,
thanks for that. now what if i want a query base on these criteria mimetype,
filename, lastmodifed and size. All of them are possible parameter for
criteria search, right? how i am going to write that?
thanks a lot.
cheers.
Marcel Reutegger wrote:
>
> Hi,
>
> if you are just looking for all jpg and png images then the following
> will do the trick:
>
> //element(*, nt:resource)[@jcr:mimeType = 'image/jpg' or @jcr:mimeType
> = 'image/png']
>
> assuming you store the images as nt:file/nt:resource nodes.
>
> a text extractor is not needed for this.
>
> regards
> marcel
>
> On Wed, Aug 26, 2009 at 12:24, freak182<em...@gmail.com> wrote:
>>
>> Hello,
>>
>> How can I search images in the JR repository? I put this exrtractor:
>> org.apache.jackrabbit.extractor.PngTextExtractor and uploaded a .png &
>> .jpg
>> file and try search using this query:
>>
>> "/jcr:root/photo/upload/username//element(*,nt:base)[fn:lower-case(@type)='jpg']"
>>
>> i do not get any hits. any idea.
>>
>> Thanks a lot.
>> Cheers.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-search-images-%28*.jpg%2C-*.png%29-tp25150156p25150156.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/how-to-search-images-%28*.jpg%2C-*.png%29-tp25150156p25327962.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: how to search images (*.jpg, *.png)
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,
if you are just looking for all jpg and png images then the following
will do the trick:
//element(*, nt:resource)[@jcr:mimeType = 'image/jpg' or @jcr:mimeType
= 'image/png']
assuming you store the images as nt:file/nt:resource nodes.
a text extractor is not needed for this.
regards
marcel
On Wed, Aug 26, 2009 at 12:24, freak182<em...@gmail.com> wrote:
>
> Hello,
>
> How can I search images in the JR repository? I put this exrtractor:
> org.apache.jackrabbit.extractor.PngTextExtractor and uploaded a .png & .jpg
> file and try search using this query:
>
> "/jcr:root/photo/upload/username//element(*,nt:base)[fn:lower-case(@type)='jpg']"
>
> i do not get any hits. any idea.
>
> Thanks a lot.
> Cheers.
>
> --
> View this message in context: http://www.nabble.com/how-to-search-images-%28*.jpg%2C-*.png%29-tp25150156p25150156.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>