AnsweredAssumed Answered

LUcene query to search only in selected folder

Question asked by dsnkostic on May 12, 2011
Latest reply on May 12, 2011 by dsnkostic
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:\"{}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));