jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Shoener" <mshoe...@softwareapps.net>
Subject RE: Query mixin and nt:resource nodes
Date Mon, 28 Sep 2009 21:54:23 GMT
I tried your suggestion to use @jcr:data and still get nothing.

I wanted to make sure it was not a file type problem so I even tried using a
plain text file.

If I use:
	 //element(*, hfs:fileInfo)[jcr:contains(., 'example')]

It works but if I use :

	//element(*, hfs:fileInfo)[jcr:contains(@jcr:data, 'example')] 
			or

	 //element(*, hfs:fileInfo)[jcr:contains(jcr:data, 'example')]

It does NOT work.

I haven't changed any of the default text extractors, so that’s not the
problem.

What exactly does the "." in the jcr:contains search in relation to the
node?

Would the source code show me and in what source file would I look?

Any other suggestions?


Best Regards,

Michael Shoener
Support Staff
Software Application Services, Inc.


-----Original Message-----
From: Alexander Klimetschek [mailto:aklimets@day.com] 
Sent: Monday, September 28, 2009 8:11 AM
To: users@jackrabbit.apache.org
Subject: Re: Query mixin and nt:resource nodes

On Fri, Sep 25, 2009 at 16:16, Michael Shoener <mshoener@softwareapps.net>
wrote:
> I have the following query:
>
>        //element(*, hfs:fileInfo)[jcr:contains(., 'example')]
>
> It returns all matching nodes because it searches on all properties 
> AND the file content itself.
>
> I really only want to query on the file contents alone (the data 
> contained in the file) so I tried the following but it does not return any
values:
>
>        //element(*, hfs:fileInfo)[jcr:contains(jcr:data, 'example')]
>
> Am I missing something in my query?

Did you try jcr:contains(@jcr:data, 'example') ?

And for binary data the extraction depends on the file type and if there is
an appropriate text extractor available. Finally, if it's a larger document
(or many text extractions have to happen at the same time), the extraction
is queued and not immediately available after session.save().

Regards,
Alex

--
Alexander Klimetschek
alexander.klimetschek@day.com


Mime
View raw message