Problem with Query

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2006 12:04 PM
Hi,
I'm using Alfresco 1.2 and I'm trying to access alfresco from a JAVA application to get content, but I've some problem.
I'm trying to use WebServices implementation to access the repository and following your good examples on Wiki I've write this sample code
In my Alfresco repository there's is a content with filename GEmap11.pdf ( and no title and description properties set ); if I tried to search "GEmap11" on standard Web Client ( put the text on top-right box ) the file is correctly searched and show on the result.
If I try to access from my JAVA web Application with the code previous indicated no results are shown; the same null result has been returned if i try to search with this code:
Only if I try to access with exactly filename the Lucene Query found my document
can someone help my to understand the problem ?
thanks in advance
I'm using Alfresco 1.2 and I'm trying to access alfresco from a JAVA application to get content, but I've some problem.
I'm trying to use WebServices implementation to access the repository and following your good examples on Wiki I've write this sample code
// Start the session AuthenticationUtils.startSession(USERNAME, PASSWORD); // Get a reference to the respository web service RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService(); // Create a query object, looking for all items with alfresco in the name of text Query query = new Query(QueryLanguageEnum.lucene, "@cm\\:name:\"GEmap11\"");…etc. // End the session AuthenticationUtils.endSession();
In my Alfresco repository there's is a content with filename GEmap11.pdf ( and no title and description properties set ); if I tried to search "GEmap11" on standard Web Client ( put the text on top-right box ) the file is correctly searched and show on the result.
If I try to access from my JAVA web Application with the code previous indicated no results are shown; the same null result has been returned if i try to search with this code:
// Create a query object, looking for all items with alfresco in the name of text Query query = new Query(QueryLanguageEnum.lucene, "@cm\\:name:\"GEmap11*\"");
Only if I try to access with exactly filename the Lucene Query found my document
// Create a query object, looking for all items with alfresco in the name of text Query query = new Query(QueryLanguageEnum.lucene, "@cm\\:name:\"GEmap11.pdf\"");
can someone help my to understand the problem ?
thanks in advance
Labels:
- Labels:
-
Archive
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 04:28 AM
I'm using Alfresco 1.3 and i have the same problem..The query return NULL, and i following the examples of Alfresco wiki:
Finding nodes by text property values
To find all nodes with the cm:name property containing the word banana.
@cm\:title:"banana"
Note that lucene requires the : to be escaped using the \ character. You will have to escape the escape character in Java like "@cm\\:title:\"banana\""
Finding nodes by text property values
To find all nodes with the cm:name property containing the word banana.
@cm\:title:"banana"
Note that lucene requires the : to be escaped using the \ character. You will have to escape the escape character in Java like "@cm\\:title:\"banana\""
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 04:56 AM
I have the same problem when I search text in a content.
Where did you find Alfresco 1.3 jlbarrera ?
Where did you find Alfresco 1.3 jlbarrera ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 05:40 AM
I download Alfresco from Subversion Repository.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 10:10 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 12:19 PM
Andy,
I really do not mean to be snarky, but if you look at what people are posting you will see that people are posting examples directly from the the link you posted. Examples, I would add, that are not working for me either.
Can you shed more light on the subject?
-Michael
I really do not mean to be snarky, but if you look at what people are posting you will see that people are posting examples directly from the the link you posted. Examples, I would add, that are not working for me either.
Can you shed more light on the subject?
-Michael

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2006 12:37 PM
infact….I've looked the Wiki example but I'm suspecting that sometingh else not works well
any help is appreciatied
any help is appreciatied

