Query not return the result correctly

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2006 11:23 AM
This is the query:
This query find 3 ID (unique for all Nodes) and the query will should return 3 Nodes, but the query return 9 !!
I i find in the query by 4 ID's, the query return 12 results!
Allways return 3 results for a ID.
This is the code:
Where idQuery is above.
Any ideas?
ID:"workspace://SpacesStore/b96b72c1-c9f8-11da-984f-3d735fa1fd62" OR ID:"workspace://SpacesStore/b98674d6-c9f8-11da-984f-3d735fa1fd62" OR ID:"workspace://SpacesStore/b7ef5ad6-c9f8-11da-984f-3d735fa1fd62"
This query find 3 ID (unique for all Nodes) and the query will should return 3 Nodes, but the query return 9 !!
I i find in the query by 4 ID's, the query return 12 results!
Allways return 3 results for a ID.
This is the code:
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();String pathQuery="ID:\"" + idQuery.toString() + "\"" ;Query queryCategory = new Query(QueryLanguageEnum.lucene, pathQuery);QueryResult queryResultCat = repositoryService.query(STORE, queryCategory, false);ResultSet resultSetCat = queryResultCat.getResultSet();ResultSetRow rowsCat[] = resultSetCat.getRows();
Where idQuery is above.
Any ideas?
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2006 04:27 AM
Hi
The index may contain several entries using ID (some internal structure to make path indexing better). So for folders you will get one entry for the node and as many more as there are unique paths to the folder.
You can solve your issue by
1) also looking for nodes +ISNODE:*
2) also looking for a specific type +TYPE:"cm:content"
See http://wiki.alfresco.com/wiki/Search
See http://wiki.alfresco.com/wiki/Search#Finding_Nodes_By_Type
I forgot to add this to the search documentation.
Regards
Andy
The index may contain several entries using ID (some internal structure to make path indexing better). So for folders you will get one entry for the node and as many more as there are unique paths to the folder.
You can solve your issue by
1) also looking for nodes +ISNODE:*
2) also looking for a specific type +TYPE:"cm:content"
See http://wiki.alfresco.com/wiki/Search
See http://wiki.alfresco.com/wiki/Search#Finding_Nodes_By_Type
I forgot to add this to the search documentation.
Regards
Andy

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2006 05:28 AM
OK Thanks! Now all worked fine 😎
