AnsweredAssumed Answered

Query by name

Question asked by sarag on May 25, 2006
Latest reply on May 29, 2006 by sarag
Hi! I'm trying to find a document by name, but it doesn'y work.
This is my query:

String spaceName = "user1";
String searchValue = "archive.txt";

RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();      
               
Reference reference = new Reference(STORE, null, "/app:company_home/*[@cm:name=\"Users\"]/*[@cm:name=\"" + spaceName + "\"]");               
Predicate predicate = new Predicate(new Reference[]{reference}, null, null);       
Node[] nodes = repositoryService.get(predicate);
               
Query query = new Query(QueryLanguageEnum.lucene,
                     "+PARENT:\"workspace://SpacesStore/"+ nodes[0].getReference().getUuid() + "\" +NAME:\"" + searchValue + "\"");               

QueryResult queryResult = repositoryService.query(STORE, query, false);

But I never get results.
What Am I doing wrong?

Thanks in advance.
Sara

Outcomes