Apache Solr open-source search software
SOLR-1204 -- Enhance SpellingQueryConverter to handle UTF-8 instead of ASCII only
Shalin Shekhar Mangar989052357791
diff --git a/CHANGES.txt b/CHANGES.txtindex d04a0b6fc54..d93aaa5cceb 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -230,6 +230,8 @@ New Features57. SOLR-1152: Snapshoot on ReplicationHandler should acccept location as a request parameter (shalin)+58. SOLR-1204: Enhance SpellingQueryConverter to handle UTF-8 instead of ASCII only (Michael Ludwig via shalin)+Optimizations----------------------1. SOLR-374: Use IndexReader.reopen to save resources by re-using parts of thediff --git a/src/java/org/apache/solr/spelling/SpellingQueryConverter.java b/src/java/org/apache/solr/spelling/SpellingQueryConverter.javaindex 2db8216fbb3..6723c721323 100644--- a/src/java/org/apache/solr/spelling/SpellingQueryConverter.java+++ b/src/java/org/apache/solr/spelling/SpellingQueryConverter.java@@ -37,7 +37,7 @@ import org.apache.lucene.analysis.TokenStream;**/public class SpellingQueryConverter extends QueryConverter {- protected Pattern QUERY_REGEX = Pattern.compile("(?:(?!(\\w+:|\\d+)))\\w+");+ protected Pattern QUERY_REGEX = Pattern.compile("(?:(?!(\\p{L}+:|\\d+)))\\p{L}+");/*** Converts the original query string to a collection of Lucene Tokens.