Index: CHANGES.txt =================================================================== --- CHANGES.txt (revision 905065) +++ CHANGES.txt (working copy) @@ -137,6 +137,9 @@ on the provided Version. Version < 3.1 will use the char-API. (Simon Willnauer via Uwe Schindler) +* LUCENE-2247: Added a CharArrayMap for performance improvements + in some stemmers. (Uwe Schindler) + Optimizations * LUCENE-2086: When resolving deleted terms, do so in term sort order Index: src/java/org/apache/lucene/analysis/CharArrayMap.java =================================================================== --- src/java/org/apache/lucene/analysis/CharArrayMap.java (revision 905065) +++ src/java/org/apache/lucene/analysis/CharArrayMap.java (working copy) @@ -1,15 +1,5 @@ package org.apache.lucene.analysis; -import java.util.Arrays; -import java.util.AbstractSet; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.Set; - -import org.apache.lucene.util.CharacterUtils; -import org.apache.lucene.util.Version; - /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,17 +17,25 @@ * limitations under the License. */ +import java.util.Arrays; +import java.util.AbstractMap; +import java.util.AbstractSet; +import java.util.Iterator; +import java.util.Map; +import org.apache.lucene.util.CharacterUtils; +import org.apache.lucene.util.Version; + /** - * A simple class that stores Strings as char[]'s in a - * hash table. Note that this is not a general purpose + * A simple class that stores key Strings as char[]'s in a + * hash table. Note that this is not a general purpose * class. For example, it cannot remove items from the - * set, nor does it resize its hash table to be smaller, - * etc. It is designed to be quick to test if a char[] - * is in the set without the necessity of converting it + * map, nor does it resize its hash table to be smaller, + * etc. It is designed to be quick to retrieve items + * by char[] keys without the necessity of converting * to a String first. *

You must specify the required {@link Version} - * compatibility when creating {@link CharArraySet}: + * compatibility when creating {@link CharArrayMap}: *