lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: [jira] Created: (LUCENE-682) QueryParser with Locale Based Operators (French included)
Date Sun, 29 Oct 2006 09:31:20 GMT

: I'll keep the &&, || and ! operators always active whatever the language.

that's probably wise

: As for the bundle.getStringArray(key), it doesn't work for properties files.
: A workaround to allow multiple words for each operator would be to put many
: on the same line in the property file, as:

: I'll make it using a semi column (;) as a separator in the property file,
: shouldn't be used too often. Please tell me if I should use something else.

As i said, i don't really have a lot of experience with ResourceBundles,
but from what i can tell, i think you should just use getStringArray and
trust whatever list comes back (you get a 0 or 1 item list when using a
Properties file right?)

the level of abstraction you have is with the ResourceBundle API -- not
the Properties API, so you shouldn't assume that your users are providing
a PropertiesResourfceBundle in which you can/need-to split the strings you
get -- trust that the getStringAttary method does the right thing, most
people wll use properties files that return single values, and if anyone
wants multiple values they can write their own class implimenting
ResourceBundle which returns multiplevalues.


if you *really* want to support multiple values in Properties fields ...
have a key which if set denotes the string value that all other values
should be split on, if not set, then no splitting is done (that way you
don't have to worry that you might pick a "split character" which winds up
being important to someone.

-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message