AnsweredAssumed Answered

Problems about searching with Lucene/Xpath

Question asked by camillo on Apr 15, 2009
Latest reply on Jun 9, 2009 by openpj
Hi all,

I have an xml file stored into a space and i would like perform some searches from my web-client.
In spite of this, I read but I have some problems about understanding the way that allows me to search informations I need.
For example, if my xml file, named pets.xml, is:


what's the query I must set to found the color of the dog?
I perform this query using this code:

RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
String path = "PATH:\"/app:company_home/cm:ZOO/cm:INFO/cm:pets.xml\" AND  TEXT:\"DOG*\"";
Query query = new Query(Constants.QUERY_LANG_LUCENE, path);
Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
QueryResult queryResult;
queryResult = repositoryService.query(STORE, query, false);
org.alfresco.webservice.types.ResultSet resultSet = queryResult.getResultSet();
org.alfresco.webservice.types.ResultSetRow[] rows = resultSet.getRows();

but it doesn't work!!!!!!
Please, help me….I'm crazying! :(
Thanks in advance!