Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
  #1 (permalink)  
Old 05-06-2008, 09:01 AM
tsx tsx is offline
Member
 
Join Date: Apr 2008
Posts: 11
tsx is on a distinguished road
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
dkarp dkarp is offline
Zimbra Employee
 
Join Date: Aug 2005
Posts: 1,312
dkarp is on a distinguished road
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
Member
 
Join Date: Apr 2008
Posts: 11
tsx is on a distinguished road
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
dkarp dkarp is offline
Zimbra Employee
 
Join Date: Aug 2005
Posts: 1,312
dkarp is on a distinguished road
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
Member
 
Join Date: Apr 2008
Posts: 11
tsx is on a distinguished road
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
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about Zimbra Asterisk and Wildfire on the same server diablo_bsd Installation 7 06-08-2008 01:54 PM
zimbra mobile inbox query override. phingers Zimbra Mobile 0 02-01-2008 06:40 AM
Change the default mail sync query to a phone phingers Zimbra Mobile 1 07-31-2007 08:46 PM
Multiple Domains Question kristiaan_d Administrators 2 03-14-2007 04:38 AM
Lotus migration babou Migration 15 03-05-2007 09:33 PM


freshmeat.net sourceforge.net The best Java IDE



 

Search Engine Optimization by vBSEO 3.0.0