Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 68831 invoked from network); 13 Oct 2006 18:11:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Oct 2006 18:11:13 -0000 Received: (qmail 70147 invoked by uid 500); 13 Oct 2006 18:11:07 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 70118 invoked by uid 500); 13 Oct 2006 18:11:07 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 70107 invoked by uid 99); 13 Oct 2006 18:11:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2006 11:11:07 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [132.210.244.93] (HELO smtpi2.usherbrooke.ca) (132.210.244.93) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2006 11:11:02 -0700 Received: from [127.0.0.1] ([132.210.142.98]) by smtpi2.usherbrooke.ca (8.13.1/8.13.1) with ESMTP id k9DIATwN022131 for ; Fri, 13 Oct 2006 14:10:32 -0400 Message-ID: <452FD6B3.4040005@USherbrooke.ca> Date: Fri, 13 Oct 2006 14:10:59 -0400 From: Patrick Turcotte User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: QueryParser syntax French Operator : DONE! References: <452FA55B.7030709@USherbrooke.ca> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-UdeS-MailScanner-Information: Veuillez consulter le http://www.usherbrooke.ca/vers/virus-courriel X-UdeS-MailScanner: Aucun code suspect =?ISO-8859-1?Q?d=E9tect=E9?= X-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.399, requis 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-UdeS-MailScanner-From: patrick.turcotte@usherbrooke.ca X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Mark Miller wrote: > Could you say in a few words what you did to accomplish this? I know that > you mentioned you used a resource bundle, but what part of the code reads > this resource bundle? What method did you use to get by the JavaCC > issues? > Basically: * I used TOKEN_MGR_DECLS to declare fields in the TokenManager class. * When setting a Locale or setting the useLocalizedOperators options (new method) in QueryParser, I fetch, with ResourceBundle, the strings to match against and set (with token_source.fieldName) values to be used by the TokenManager class * I expanded the token to do further processing (as per JavaCC syntax), which create a TokenLixicalActions(Token matchedToken) in the TokenManager class with syntax: (<_TERM_CHAR>)* > { // THIS Will end up in TokenLixicalActions(Token matchedToken) method // DEFINE java processing with matchedToken.image to get to the matched string, set matchedToken.kind accordingly. // USES fields set by the QueryParser to decide on behavior } Hope this answer your question. Patrick > thanks, > > -Mark > > On 10/13/06, Patrick Turcotte wrote: >> >> Hello! >> >> This may not be the best place for this message, sorry if this is the >> case, but since this is the result of a question I asked here, I decided >> to post it here. If I'm in error, please refer me to the best procedure. >> Thanks! >> >> I've completed the desired "patch". I now have a version of the >> QueryParser that can "understand" the AND, OR and NOT keyword in other >> languages. >> >> 1) Patched from revision 454769 of lucene 2.1dev (trunk) >> 2) The "ant test" target is still successful when the modified >> QueryParser is used >> 3) It doesn't break actual code >> 4) The default behavior is the same as before >> 5) It has to be deliberately activated >> 6) It use ResourceBundle to find the keywords translation >> 7) Comes with FRENCH translation >> 8) Comes with JUnit testCases >> 9) Adds 1 public method to QueryParser >> >> So, now, how do I go about sending it all to the those who can decide to >> integrate it? Where? In what format? Etc. >> >> Thanks, >> >> Patrick Turcotte >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> > -- Patrick Turcotte ------------------------------------ Patrick.Turcotte@USherbrooke.ca (819) 821-8000, poste 63234 1-800-267-8337 poste 63234 --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org