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 12-12-2007, 08:52 AM
Active Member
 
Posts: 27
Default Grammar for Search Query

Greetings,

I am planning to write some code for a Zimlet which will search specific fields in an Appointment. For this I need to understand the Grammar of the element <query></query> in the Search request.

I have downloaded the source of Zimbra 4.5.6, but I could not find the Grammar file which is used by the Zimbra Server to parse the search queries. As far as I understand Zimbra uses Java CC parser to read the Grammar files and generate the Code.
Please let me know if my understanding is incorrect.


I would like to know if these Grammar files are also shipped with the Zimbra 4.5.6 Open Source edition? If it is shipped please let me know where could I find the Grammar file for the Search queries?

Any help in this regard will be greatly appreciated.
__________________
Regards,
Zocs...
Reply With Quote
  #2 (permalink)  
Old 12-12-2007, 12:52 PM
Zimbra Employee
 
Posts: 269
Default

Not really sure what you mean by grammar, but the SOAP API is spelled out here:

ZimbraServer/docs/soap.txt
ZimbraServer/docs/soap-calendar.txt

Among other useful information..


HTH.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 12-12-2007, 09:12 PM
Active Member
 
Posts: 27
Default Grammar for Search Query

Greetings,

Thanks for your inputs.

By Grammar I mean the the Language and Grammar which is generally used to generate parsers. When a users fires a search request to the Zimbra Server it contains an element <query> which contains the query user has fired. This query is parsed on the Zimbra Server side by a parser which is generated by Java CC (A Parser generation tool in java) found at https://javacc.dev.java.net/
This tool needs a Language and Grammar to generate a parser as it is with other classical tools like Yacc (mostly used with lex-another tool).

To be specific I would like to know the Grammar for query element in following code
Code:
<soap:Body><SearchRequest xmlns="urn:zimbraMail"

 offset="0" limit="25" types="message,contact,appointment,wiki,document"><tz id="(GMT+05.30) Chennai

 / Kolkata / Mumbai / New Delhi"/><locale>en-US</locale>
<query>((from:(swapnil)) OR (from:(ajay))) in:inbox larger:2kb</query>
</SearchRequest></soap

:Body>
Above mentioned search criteria is just an example and there are other various complex scenario's possible for the search criteria in <query></query> node.
__________________
Regards,
Zocs...
Reply With Quote
  #4 (permalink)  
Old 12-12-2007, 09:21 PM
Active Member
 
Posts: 27
Default

By the way, i found explanation of the individual items in search query at the following Zimbra Wiki page. It explains the Grammar but it in itself does not have the Grammar file used to generate the parser.

Search Tips - Zimbra :: Wiki


thanks.
__________________
Regards,
Zocs...
Reply With Quote
  #5 (permalink)  
Old 12-13-2007, 10:00 AM
Active Member
 
Posts: 27
Default

Does Zimra ship the Grammar and Language files in Open Source edition?
If yes where could I find it? I am using 4.5.6 Open source edition.
__________________
Regards,
Zocs...
Reply With Quote
  #6 (permalink)  
Old 12-20-2007, 03:24 PM
Zimbra Employee
 
Posts: 52
Default

Take a look at ZimbraServer/docs/query.txt

-Conrad
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #7 (permalink)  
Old 12-21-2007, 03:54 AM
Active Member
 
Posts: 27
Default

Thanks cdamon for the reply.
Actually I have read the mentioned document and also the link mentioned at Search Tips - Zimbra :: Wiki

I am looking for the exact grammar file used as input to the Java CC tool, to generate the parser.

Actually I am developing a zimlet to which the complex search query will be passed and I need to parse this search query. So if i have the exact grammar files it would help me to code better the parser which will parse the search query, as i will consider all the use-case scenarios in a better way.
__________________
Regards,
Zocs...
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.