On Thu, Sep 24, 2009 at 18:39, Michael Shoener <[email protected]> wrote: > I have the following query: > > //element(*, hfs:fileInfo)[jcr:contains(., 'search term') or > jcr:contains(@hfs:description, 'search term')]/(@hfs:description) > > It returns all documents that have the 'search term' contained in either a > the description property, the content of the file, but it also searches all > other property values. > > What I want is to search only the content and my specified property > (description), but leave out documents that happen to have the 'search term' > in another property.
What do you mean by content? I guess not the "." in jcr:contains(., 'search term') as this covers the whole node (and whatever the indexing considered as full text for the whole node. If you want the content of the binary stream and your node is like nt:file/nt:resource, I suggest to use jcr:contains(jcr:data, 'search term') as that property contains the binary data in case of a nt:resource. Regards, Alex -- Alexander Klimetschek [email protected]
