cancel
Showing results for 
Search instead for 
Did you mean: 

Searching lucene problem

monitloth
Champ on-the-rise
Champ on-the-rise
Hello,

I am searching for the nodes beginning with "Alf". I followed the document from http://wiki.alfresco.com/wiki/Search#Finding_Nodes_By_Type
While I used many variations, I did not yet get a result.What can the problem be?

String searchQuery = "@cm\\:name:Alf*";
      
      System.out.println("Searchquery: " + searchQuery);
      

      StoreRef storeRef = new StoreRef("user", "alfrescoUserStore");
      ResultSet resultSet = searchService.query(storeRef,
            SearchService.LANGUAGE_LUCENE, searchQuery);
      //System.out.println("groupName 1 =" + groupName);
      if (resultSet.length() == 0) {
         System.out.println("No result");
         return null;
      } else {…
Thanks by advance.
10 REPLIES 10

monitloth
Champ on-the-rise
Champ on-the-rise
What I want is listing de directories from Company Home/Backup.
I see that I can test it with the Node Browser. But, still, I didn't figure out how to get what I want.

Thanks.

monitloth
Champ on-the-rise
Champ on-the-rise
I have found in the forums this (to begin with):
PATH:"/app:company_home/";
I get the error that it could not be parsed.

Thanks.

mikeh
Star Contributor
Star Contributor
StoreRef storeRef = new StoreRef("workspace", "SpacesStore");

Mike

monitloth
Champ on-the-rise
Champ on-the-rise
I forgot to say that for my second post, I was working with webscripts.

monitloth
Champ on-the-rise
Champ on-the-rise
I tried many combinations but didn't find the correct one (got nothing, or all the spaces…). Can someone help me on this?

What I want to do is get the spaces (not spaces in these spaces) under Company Home/Backup.

Thanks very much.

mikeh
Star Contributor
Star Contributor
You're probably just not escaping the query correctly.

Please post the query you've got working from the Node Browser

Mike

monitloth
Champ on-the-rise
Champ on-the-rise
I have this code:
var query = "PATH:/ app:company_home//*";
which gives nothing.
While this code here works:
var query = "TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\"";
And I must make a combination of the two queries.
Thanks very much.

mikeh
Star Contributor
Star Contributor
Try
+PATH:"/app:company_home/cm:backup/*" +TYPE:"cm:folder"

monitloth
Champ on-the-rise
Champ on-the-rise
I got files, some (or all?) where deleted files (I think). After deleting the deleted files from "Manage Deleted Files", I got no more results.

Thanks for your answer.

EDIT: I was working high probably in archive:.