From 3d55e144ac45fdb7af9c736442077e1ecf05c417 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 1 Feb 2012 13:01:44 +0000 Subject: [PATCH] SOLR-3056: support kuromoji in core git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1239117 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/solr/contrib/analysis-extras/pom.xml.template | 5 ----- dev-tools/maven/solr/core/pom.xml.template | 5 +++++ solr/CHANGES.txt | 3 +++ solr/common-build.xml | 4 +++- solr/contrib/analysis-extras/CHANGES.txt | 3 --- solr/contrib/analysis-extras/README.txt | 3 +-- solr/contrib/analysis-extras/build.xml | 6 ++---- .../apache/solr/analysis/KuromojiBaseFormFilterFactory.java | 0 .../analysis/KuromojiPartOfSpeechStopFilterFactory.java | 0 .../org/apache/solr/analysis/KuromojiTokenizerFactory.java | 0 .../solr/analysis/TestKuromojiBaseFormFilterFactory.java | 0 .../analysis/TestKuromojiPartOfSpeechStopFilterFactory.java | 0 .../apache/solr/analysis/TestKuromojiTokenizerFactory.java | 0 .../apache/solr/analysis/StringMockSolrResourceLoader.java | 0 14 files changed, 14 insertions(+), 15 deletions(-) rename solr/{contrib/analysis-extras => core}/src/java/org/apache/solr/analysis/KuromojiBaseFormFilterFactory.java (100%) rename solr/{contrib/analysis-extras => core}/src/java/org/apache/solr/analysis/KuromojiPartOfSpeechStopFilterFactory.java (100%) rename solr/{contrib/analysis-extras => core}/src/java/org/apache/solr/analysis/KuromojiTokenizerFactory.java (100%) rename solr/{contrib/analysis-extras => core}/src/test/org/apache/solr/analysis/TestKuromojiBaseFormFilterFactory.java (100%) rename solr/{contrib/analysis-extras => core}/src/test/org/apache/solr/analysis/TestKuromojiPartOfSpeechStopFilterFactory.java (100%) rename solr/{contrib/analysis-extras => core}/src/test/org/apache/solr/analysis/TestKuromojiTokenizerFactory.java (100%) rename solr/{contrib/analysis-extras/src/test => test-framework/src/java}/org/apache/solr/analysis/StringMockSolrResourceLoader.java (100%) diff --git a/dev-tools/maven/solr/contrib/analysis-extras/pom.xml.template b/dev-tools/maven/solr/contrib/analysis-extras/pom.xml.template index e1206bf82f3..5d1ca14d3d0 100644 --- a/dev-tools/maven/solr/contrib/analysis-extras/pom.xml.template +++ b/dev-tools/maven/solr/contrib/analysis-extras/pom.xml.template @@ -61,11 +61,6 @@ lucene-analyzers-icu ${project.version} - - org.apache.lucene - lucene-analyzers-kuromoji - ${project.version} - org.apache.lucene lucene-analyzers-smartcn diff --git a/dev-tools/maven/solr/core/pom.xml.template b/dev-tools/maven/solr/core/pom.xml.template index 894a5a79204..3db634c065c 100644 --- a/dev-tools/maven/solr/core/pom.xml.template +++ b/dev-tools/maven/solr/core/pom.xml.template @@ -70,6 +70,11 @@ lucene-analyzers-common ${project.version} + + org.apache.lucene + lucene-analyzers-kuromoji + ${project.version} + org.apache.lucene lucene-analyzers-phonetic diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 3ed5af63321..719e69c1ddd 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -454,6 +454,9 @@ New Features that filters tokens based on their TypeAttribute. (Tommaso Teofili via Uwe Schindler) +* LUCENE-3305, SOLR-3056: Added Kuromoji morphological analyzer for Japanese. + (Christian Moen, Masaru Hasegawa via Robert Muir) + Optimizations ---------------------- * SOLR-1931: Speedup for LukeRequestHandler and admin/schema browser. New parameter diff --git a/solr/common-build.xml b/solr/common-build.xml index 295fd3d3c7d..6b88f31419f 100644 --- a/solr/common-build.xml +++ b/solr/common-build.xml @@ -82,6 +82,7 @@ + @@ -172,7 +173,7 @@ @@ -186,6 +187,7 @@ + diff --git a/solr/contrib/analysis-extras/CHANGES.txt b/solr/contrib/analysis-extras/CHANGES.txt index aa4dac55577..b1d043a8e39 100644 --- a/solr/contrib/analysis-extras/CHANGES.txt +++ b/solr/contrib/analysis-extras/CHANGES.txt @@ -19,9 +19,6 @@ $Id$ ================== 3.6.0 ================== -* LUCENE-3305: Added Kuromoji morphological analyzer for Japanese. - (Christian Moen, Masaru Hasegawa via Robert Muir) - * SOLR-2919: Added parametric tailoring options to ICUCollationKeyFilterFactory. These can be used to customize range query/sort behavior, for example to support numeric collation, ignore punctuation/whitespace, ignore accents but diff --git a/solr/contrib/analysis-extras/README.txt b/solr/contrib/analysis-extras/README.txt index a5bbf1bf07c..c9329438fe7 100644 --- a/solr/contrib/analysis-extras/README.txt +++ b/solr/contrib/analysis-extras/README.txt @@ -2,12 +2,11 @@ The analysis-extras plugin provides additional analyzers that rely upon large dependencies/dictionaries. It includes integration with ICU for multilingual support, and -analyzers for Chinese, Japanese, and Polish. +analyzers for Chinese and Polish. Relies upon the following lucene components (in lucene-libs/): * lucene-analyzers-icu-X.Y.jar - * lucene-analyzers-kuromoji-X.Y.jar * lucene-analyzers-smartcn-X.Y.jar * lucene-analyzers-stempel-X.Y.jar diff --git a/solr/contrib/analysis-extras/build.xml b/solr/contrib/analysis-extras/build.xml index b0d6d4e5f7c..c6d2fdcf859 100644 --- a/solr/contrib/analysis-extras/build.xml +++ b/solr/contrib/analysis-extras/build.xml @@ -27,23 +27,21 @@ - + depends="jar-analyzers-icu, jar-analyzers-smartcn, jar-analyzers-stempel"> - - + diff --git a/solr/contrib/analysis-extras/src/java/org/apache/solr/analysis/KuromojiBaseFormFilterFactory.java b/solr/core/src/java/org/apache/solr/analysis/KuromojiBaseFormFilterFactory.java similarity index 100% rename from solr/contrib/analysis-extras/src/java/org/apache/solr/analysis/KuromojiBaseFormFilterFactory.java rename to solr/core/src/java/org/apache/solr/analysis/KuromojiBaseFormFilterFactory.java diff --git a/solr/contrib/analysis-extras/src/java/org/apache/solr/analysis/KuromojiPartOfSpeechStopFilterFactory.java b/solr/core/src/java/org/apache/solr/analysis/KuromojiPartOfSpeechStopFilterFactory.java similarity index 100% rename from solr/contrib/analysis-extras/src/java/org/apache/solr/analysis/KuromojiPartOfSpeechStopFilterFactory.java rename to solr/core/src/java/org/apache/solr/analysis/KuromojiPartOfSpeechStopFilterFactory.java diff --git a/solr/contrib/analysis-extras/src/java/org/apache/solr/analysis/KuromojiTokenizerFactory.java b/solr/core/src/java/org/apache/solr/analysis/KuromojiTokenizerFactory.java similarity index 100% rename from solr/contrib/analysis-extras/src/java/org/apache/solr/analysis/KuromojiTokenizerFactory.java rename to solr/core/src/java/org/apache/solr/analysis/KuromojiTokenizerFactory.java diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestKuromojiBaseFormFilterFactory.java b/solr/core/src/test/org/apache/solr/analysis/TestKuromojiBaseFormFilterFactory.java similarity index 100% rename from solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestKuromojiBaseFormFilterFactory.java rename to solr/core/src/test/org/apache/solr/analysis/TestKuromojiBaseFormFilterFactory.java diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestKuromojiPartOfSpeechStopFilterFactory.java b/solr/core/src/test/org/apache/solr/analysis/TestKuromojiPartOfSpeechStopFilterFactory.java similarity index 100% rename from solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestKuromojiPartOfSpeechStopFilterFactory.java rename to solr/core/src/test/org/apache/solr/analysis/TestKuromojiPartOfSpeechStopFilterFactory.java diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestKuromojiTokenizerFactory.java b/solr/core/src/test/org/apache/solr/analysis/TestKuromojiTokenizerFactory.java similarity index 100% rename from solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestKuromojiTokenizerFactory.java rename to solr/core/src/test/org/apache/solr/analysis/TestKuromojiTokenizerFactory.java diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/StringMockSolrResourceLoader.java b/solr/test-framework/src/java/org/apache/solr/analysis/StringMockSolrResourceLoader.java similarity index 100% rename from solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/StringMockSolrResourceLoader.java rename to solr/test-framework/src/java/org/apache/solr/analysis/StringMockSolrResourceLoader.java