AnsweredAssumed Answered

name lucene search

Question asked by suryamax1 on Sep 10, 2008
Hi ,

I have a user home in the name "Surya" within the Company Home . Within Surya I have two spaces created:
a Proposal
b Policy

I want to search in the names of the contents within the spaces -
which satisfy a criteria given by the variable "sOperation". When I execute this query then it retruns me all the contents in the Policy or the Proposal folder. Can you please show me what is wrong in the Lucene query below:

Reference reference = new Reference(STORE, null, "/app:company_home/app:user_homes/sys:"+userDTO.getUserId()+"/*[@cm:name=\""+sOperation+"\"]");
            Predicate predicate = new Predicate(new Reference[]{reference}, null, null);       
            Node[] nodes = repositoryService.get(predicate);
            Query query = new Query(
                    "+PARENT:\"workspace://SpacesStore/"+ nodes[0].getReference().getUuid() + "\"@cm//:text:" + sFileName + "\"");
        // Execute the query
        QueryResult queryResult = repositoryService.query(STORE, query, false);
        // Display the results
        ResultSet resultSet = queryResult.getResultSet();
        ResultSetRow[] rows = resultSet.getRows();

Please help it's urgent….