Hi Alan, Have you tried with a repository configured with SearchIndex?
If my memory serves me right, you need to configure a SearchIndex in your repository before you can run a query against it. To configure SearchIndex look at sample config in http://jackrabbit.apache.org/doc/config.html where SearchIndex is configured. Regards, Felix --- Alan Menant <[EMAIL PROTECTED]> wrote: > I tried this example : > http://svn.apache.org/repos/asf/jackrabbit/trunk/contrib/examples/src/java/org/apache/jackrabbit/examples/FSImport.java > > and it looks like to be working fine for indexing > folders and files. My > folder contains .txt and .pdf files. > > > The second step is to make a search on this > folder... > I wrote this : > > // Recherche > Workspace workspace = > session.getWorkspace(); > QueryManager queryManager = > workspace.getQueryManager(); > > // Requête Xpath > Query query = > queryManager.createQuery("//*[jcr:contains(.,'test')]", > Query.XPATH); > QueryResult result = query.execute(); > NodeIterator iter = result.getNodes(); > > System.out.println(iter.getSize()+ " > résultats"); > > while(iter.hasNext()) > { > Node noeud = (Node)iter.next(); > > > System.out.println(noeud.getProperty("jcr:data").getString()); > } > > This mean "Please give me all results that contains > the word 'test'" (if > I made no mistakes). > But I have no results at all. > > I think I didn't stand everything in jackrabbit, can > anyone help me ? > > Thanks. > ___________________________________________________________ Try the all-new Yahoo! Mail. "The New Version is radically easier to use" The Wall Street Journal http://uk.docs.yahoo.com/nowyoucan.html
