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 <TERM> to do further processing (as per
JavaCC syntax), which create a TokenLixicalActions(Token
matchedToken) in the TokenManager class with syntax:
<TERM: <_TERM_START_CHAR> (<_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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Patrick Turcotte
------------------------------------
[EMAIL PROTECTED]
(819) 821-8000, poste 63234
1-800-267-8337 poste 63234
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]