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 http://wiki.alfresco.com/wiki/Search_Documentation 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:
<INFO>
<ANIMALS>
<ANIMAL>
<NAME>CAT</NOME>
<COLOR>BLACK</COLOR>
</ANIMAL>
<ANIMAL>
<NAME>DOG</NOME>
<COLOR>BROWN</COLOR>
</ANIMAL>
<ANIMALS>
</INFO>
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!