Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-06-2008, 09:01 AM
tsx tsx is offline
Intermediate Member
 
Posts: 16
Default [SOLVED] Question about query grammer

I'm trying to get all conversations in a folder. I'm using the query

Code:
"in:<foldername>"
It works for most of the folders but fails when it encounters a subfolder. For example, if I have a subfolder Test under Inbox (Inbox/Test)

Code:
in:"Inbox"
works but

Code:
in:"Test"
fails. I'm thinking the best way would be to use folder ids instead of folder names (right?).

Can someone help me with the query to get all entries in a folder using folder id not folder name?

Any help would be appreciated.

Thanks in advance.

-t
Reply With Quote
  #2 (permalink)  
Old 05-06-2008, 09:07 AM
Zimbra Employee
 
Posts: 1,434
Default

Quote:
Originally Posted by tsx View Post
I'm trying to get all conversations in a folder. I'm using the query

Code:
"in:<foldername>"
It works for most of the folders but fails when it encounters a subfolder. For example, if I have a subfolder Test under Inbox (Inbox/Test)

Code:
in:"Inbox"
works but

Code:
in:"Test"
fails. I'm thinking the best way would be to use folder ids instead of folder names (right?).
Nope. Just try
Code:
in:"Inbox/Test"
There is a way to search by folder ID, but this way is clearer.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 05-06-2008, 09:16 AM
tsx tsx is offline
Intermediate Member
 
Posts: 16
Default

Thanks for the quick reply.

The reason I was considering folder search by ID was because I only have a Soap element. I don't have the complete path. Is there a way to get the complete path from an element? If not, I guess I can create one.

Just to put things in context, I'm try to collect all the folders and conversations using combination of Soap and Java.

-t
Reply With Quote
  #4 (permalink)  
Old 05-06-2008, 09:22 AM
Zimbra Employee
 
Posts: 1,434
Default

GetFolderRequest will give you the entire folder hierarchy. SearchRequest can then get you the messages or conversations that cross that folder.

If you really want to search by folder ID, the term is inid:folderID.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #5 (permalink)  
Old 05-06-2008, 09:46 AM
tsx tsx is offline
Intermediate Member
 
Posts: 16
Default

That did the trick. Thanks much.

BTW, I'm doing exactly the same way you suggested. GetFolderRequest then SearchRequest. I'm parsing GetFolderResponse for elements and I'm using those elements in the SearchRequest query. I might be missing something but I didn't see any attribute/element within folder elements that had complete path.

Thanks again.

-t
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.