jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From olivier <oliv.b...@voila.fr>
Subject Search with the SQL language and conditions
Date Tue, 22 Aug 2006 12:04:43 GMT
Hi, 
 I would search files in the repository. I use SQL language.
 Here my code : 
 String keywords = "olivier";
 String querySQL = "SELECT * FROM " + "nt:file" +" WHERE jcr:path Like '%" + keywords + "%'";

 QueryManager queryManager = session.getWorkspace().getQueryManager();
 Query query = queryManager.createQuery(querySQL,"sql");
 QueryResult queryResult = query.execute();
 System.out.println("noombre de resultats : " + queryResult.getRows().getSize());
 I obtain no error, but no results. When i delete the condition "where...", I recover all
the files.
 Why don't it function with the condition "where..."? 
 Somebody can he help me?
 Olivier
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message