Index: modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/package.html =================================================================== --- modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/package.html (revision 1151699) +++ modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/package.html (working copy) @@ -25,19 +25,38 @@

Query Configuration Interfaces

-The package org.apache.lucene.queryparser.flexible.config contains query configuration handler +The package org.apache.lucene.queryParser.flexible.core.config contains query configuration handler abstract class that all config handlers should extend.

-See {@link org.apache.lucene.queryparser.flexible.standard.config.StandardQueryConfigHandler} for a reference +See {@link org.apache.lucene.queryParser.flexible.standard.config.StandardQueryConfigHandler} for a reference implementation.

-The {@link org.apache.lucene.queryparser.flexible.core.config.QueryConfigHandler} and {@link org.apache.lucene.queryparser.flexible.core.config.FieldConfig} are used in the processors to access config +The {@link org.apache.lucene.queryParser.flexible.core.config.QueryConfigHandler} and {@link org.apache.lucene.queryParser.flexible.core.config.FieldConfig} are used in the processors to access config information in a flexible and independent way. -See {@link org.apache.lucene.queryparser.flexible.standard.processors.ParametricRangeQueryNodeProcessor} for a +See {@link org.apache.lucene.queryParser.flexible.standard.processors.ParametricRangeQueryNodeProcessor} for a reference implementation.

+

+Since version 3.4, the configuration API has changed. It no longer uses {@link org.apache.lucene.util.Attribute} objects to configure +a query parser. Instead, it uses {@link org.apache.lucene.queryParser.flexible.core.config.ConfigurationKey} objects to set any configuration +to a {@link org.apache.lucene.queryParser.flexible.core.config.QueryConfigHandler}. +

+

+Here is an example about how the new configuration API works: +

+
+...
+// this constant will be the key to get and set your configuration. This should be unique in your application.
+final public static {@link org.apache.lucene.queryParser.flexible.core.config.ConfigurationKey}<{@link java.text.NumberFormat}> MY_CONFIG = {@link org.apache.lucene.queryParser.flexible.core.config.ConfigurationKey}.newInstance();
+...
+// make sure to use your unique key instance to set and get your configuration
+queryConfigHandler.set(MY_CONFIG, {@link java.text.NumberFormat}.getInstance());
+{@link java.text.NumberFormat} numberFormat = queryConfigHandler.get(MY_CONFIG);
+...
+
+ - +