I am trying to write Lucene query where you can only search for contents in selected folder and not to go recursive in sub-folders.Here is an example so far…
String queryStr = "PATH:\"/" + projectPath + "//.\" ";
queryStr += " AND TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"";
Query query = new Query(Constants.QUERY_LANG_LUCENE, queryStr);
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
Store storeRef = new Store(Constants.WORKSPACE_STORE, ZADConstants.SPACESSTORE);
Node [] nodes = null;
nodes = repositoryService.get(new Predicate(null, storeRef, query));