Lucene query dont return all node properties
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2010 03:38 AM
Hi, i´m trying to find some documents in my repository with lucene querys throught webservice. Everything works fine, but in the ResultSetRow[],in each row I only recive one NamedValue (the path).
My query is:
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
// Get a reference to the space we have named
Reference reference = new Reference(Constants.STORE, null, "/app:company_home/cm:apptrabsoc/*[@cm:name=\"" + spaceName + "\"]");
Predicate predicate = new Predicate(new Reference[]{reference}, null, null);
Node[] nodes = repositoryService.get(predicate);
// Create a query object, looking for all items with alfresco in the name of text
Query query = new Query(
org.alfresco.webservice.util.Constants.QUERY_LANG_LUCENE,
"+PARENT:\"workspace://SpacesStore/"+ nodes[0].getReference().getUuid() + "\" +TEXT:\"" + searchValue + "\"");
// Execute the query
QueryResult queryResult = repositoryService.query(Constants.STORE, query, false);
Is there anything wrong? shoud I stablish something to get all properties ?
Thanks in advance
My query is:
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
// Get a reference to the space we have named
Reference reference = new Reference(Constants.STORE, null, "/app:company_home/cm:apptrabsoc/*[@cm:name=\"" + spaceName + "\"]");
Predicate predicate = new Predicate(new Reference[]{reference}, null, null);
Node[] nodes = repositoryService.get(predicate);
// Create a query object, looking for all items with alfresco in the name of text
Query query = new Query(
org.alfresco.webservice.util.Constants.QUERY_LANG_LUCENE,
"+PARENT:\"workspace://SpacesStore/"+ nodes[0].getReference().getUuid() + "\" +TEXT:\"" + searchValue + "\"");
// Execute the query
QueryResult queryResult = repositoryService.query(Constants.STORE, query, false);
Is there anything wrong? shoud I stablish something to get all properties ?
Thanks in advance
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 11:36 AM
I remember that Alfresco 3.2r has a bug about this, the Web Service API doesn't return all the properties.
Try to upgrade to Alfresco 3.3 it should work :wink:
Hope this helps.
Try to upgrade to Alfresco 3.3 it should work :wink:
Hope this helps.