my query is ok now... using SQL SELECT * FROM nt:base WHERE CONTAINS(.,'data mining') AND ( (jcr:mimeType='app lication/pdf') ) order by jcr:score DESC
thanks 2007/2/5, Marcel Reutegger <[EMAIL PROTECTED]>:
Alexandre Martins wrote: > I need retrive nodes that contains some text and are of a specific file > types. > > "SELECT * FROM nt:base WHERE CONTAINS(.,'" + pTextQuery + "') AND jcr:path > LIKE '%/%.pdf/%' order by jcr:score DESC"; Matching of paths in JSR 170 is limited to only a few simple use cases. What you basically can do is search in a sub-tree: jcr:path LIKE '/foo/bar/%'. If you have more complex needs you should use XPath, which allows you to filter on every path segment. > i´m using the query (below) normaly to retrieve files indexed by some text. > > "SELECT * FROM nt:base WHERE CONTAINS(.,'" + pTextQuery + "') order by > jcr:score DESC"; As of jackrabbit 1.2.1 you can use the following query: //element(*, nt:file)[jcr:contains(jcr:content, 'your query') and jcr:content/@jcr:mimeType = 'application/pdf'] regards marcel
-- Alexandre Costa Martins CESAR - Recife Center for Advanced Studies and Systems Software Engineer and Software Reuse Researcher MSc Candidate at Federal University of Pernambuco RiSE Member - http://www.rise.com.br E-mail: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] GTalk: [EMAIL PROTECTED] Skype: xandecmartins Mobile: +55 (81) 9929-9548 Office: +55 (81) 3425-4787 Fax: +55 (81) 3425-4701
