From 868b99721125e5780215453334387860c07f83b9 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 1 Apr 2010 17:24:12 +0000 Subject: [PATCH] SOLR-1859: speed up indexing for example schema git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@930050 13f79535-47bb-0310-9956-ffa450edef68 --- solr/client/ruby/solr-ruby/solr/conf/schema.xml | 3 ++- solr/client/ruby/solr-ruby/test/conf/schema.xml | 9 ++++++--- .../src/test/resources/solr/conf/schema.xml | 9 ++++++--- .../solr/conf/dataimport-schema-no-unique-key.xml | 6 ++++-- .../resources/solr/conf/dataimport-schema.xml | 9 ++++++--- .../solr/conf/dataimport-solr_id-schema.xml | 9 ++++++--- .../src/test/resources/solr/conf/schema.xml | 11 ++++------- .../velocity/src/main/solr/conf/schema.xml | 9 ++++++--- solr/example/example-DIH/solr/db/conf/schema.xml | 9 ++++++--- .../example/example-DIH/solr/mail/conf/schema.xml | 9 ++++++--- solr/example/example-DIH/solr/rss/conf/schema.xml | 15 ++++++++++----- .../example/example-DIH/solr/tika/conf/schema.xml | 6 ++++-- solr/example/solr/conf/schema.xml | 9 ++++++--- .../DocumentAnalysisRequestHandlerTest.java | 8 ++++---- .../handler/FieldAnalysisRequestHandlerTest.java | 8 ++++---- .../solr/conf/schema-copyfield-test.xml | 11 ++++------- .../solr/conf/schema-luceneMatchVersion.xml | 4 ++-- .../solr/conf/schema-required-fields.xml | 11 ++++------- .../test-files/solr/conf/schema-spellchecker.xml | 2 +- .../src/test/test-files/solr/conf/schema-trie.xml | 9 ++++++--- solr/src/test/test-files/solr/conf/schema.xml | 15 ++++++--------- solr/src/test/test-files/solr/conf/schema11.xml | 9 ++++++--- solr/src/test/test-files/solr/conf/schema12.xml | 6 ++++-- .../test/test-files/solr/crazy-path-to-schema.xml | 2 +- 24 files changed, 114 insertions(+), 84 deletions(-) diff --git a/solr/client/ruby/solr-ruby/solr/conf/schema.xml b/solr/client/ruby/solr-ruby/solr/conf/schema.xml index 386fd584223..d5de66d14fa 100755 --- a/solr/client/ruby/solr-ruby/solr/conf/schema.xml +++ b/solr/client/ruby/solr-ruby/solr/conf/schema.xml @@ -155,7 +155,8 @@ - + + diff --git a/solr/client/ruby/solr-ruby/test/conf/schema.xml b/solr/client/ruby/solr-ruby/test/conf/schema.xml index 67c921513e5..14c686cd785 100755 --- a/solr/client/ruby/solr-ruby/test/conf/schema.xml +++ b/solr/client/ruby/solr-ruby/test/conf/schema.xml @@ -149,7 +149,8 @@ - + + @@ -158,7 +159,8 @@ - + + @@ -173,7 +175,8 @@ - + + diff --git a/solr/contrib/clustering/src/test/resources/solr/conf/schema.xml b/solr/contrib/clustering/src/test/resources/solr/conf/schema.xml index 9a4a42df525..450d0e75805 100644 --- a/solr/contrib/clustering/src/test/resources/solr/conf/schema.xml +++ b/solr/contrib/clustering/src/test/resources/solr/conf/schema.xml @@ -175,7 +175,8 @@ /> - + + @@ -184,7 +185,8 @@ - + + @@ -199,7 +201,8 @@ --> - + + diff --git a/solr/contrib/dataimporthandler/src/extras/test/resources/solr/conf/dataimport-schema-no-unique-key.xml b/solr/contrib/dataimporthandler/src/extras/test/resources/solr/conf/dataimport-schema-no-unique-key.xml index 0be581f386a..4d023e71e97 100644 --- a/solr/contrib/dataimporthandler/src/extras/test/resources/solr/conf/dataimport-schema-no-unique-key.xml +++ b/solr/contrib/dataimporthandler/src/extras/test/resources/solr/conf/dataimport-schema-no-unique-key.xml @@ -167,7 +167,8 @@ - + @@ -176,7 +177,8 @@ - + diff --git a/solr/contrib/dataimporthandler/src/test/resources/solr/conf/dataimport-schema.xml b/solr/contrib/dataimporthandler/src/test/resources/solr/conf/dataimport-schema.xml index 75416dff34e..b6d8dabc71f 100644 --- a/solr/contrib/dataimporthandler/src/test/resources/solr/conf/dataimport-schema.xml +++ b/solr/contrib/dataimporthandler/src/test/resources/solr/conf/dataimport-schema.xml @@ -167,7 +167,8 @@ - + @@ -176,7 +177,8 @@ - + @@ -191,7 +193,8 @@ - + diff --git a/solr/contrib/dataimporthandler/src/test/resources/solr/conf/dataimport-solr_id-schema.xml b/solr/contrib/dataimporthandler/src/test/resources/solr/conf/dataimport-solr_id-schema.xml index f7b8dfd6d1f..80fce50a862 100644 --- a/solr/contrib/dataimporthandler/src/test/resources/solr/conf/dataimport-solr_id-schema.xml +++ b/solr/contrib/dataimporthandler/src/test/resources/solr/conf/dataimport-solr_id-schema.xml @@ -167,7 +167,8 @@ - + @@ -176,7 +177,8 @@ - + @@ -191,7 +193,8 @@ - + diff --git a/solr/contrib/extraction/src/test/resources/solr/conf/schema.xml b/solr/contrib/extraction/src/test/resources/solr/conf/schema.xml index 7a733e8fc65..68c0d4465f1 100644 --- a/solr/contrib/extraction/src/test/resources/solr/conf/schema.xml +++ b/solr/contrib/extraction/src/test/resources/solr/conf/schema.xml @@ -121,10 +121,7 @@ - - + @@ -247,14 +244,14 @@ - + - + @@ -302,7 +299,7 @@ - + diff --git a/solr/contrib/velocity/src/main/solr/conf/schema.xml b/solr/contrib/velocity/src/main/solr/conf/schema.xml index 808f69c4664..72e167de7e4 100755 --- a/solr/contrib/velocity/src/main/solr/conf/schema.xml +++ b/solr/contrib/velocity/src/main/solr/conf/schema.xml @@ -220,7 +220,8 @@ /> - + + @@ -232,7 +233,8 @@ /> - + + @@ -246,7 +248,8 @@ - + + diff --git a/solr/example/example-DIH/solr/db/conf/schema.xml b/solr/example/example-DIH/solr/db/conf/schema.xml index 18cb8d8dfe8..00850530eba 100644 --- a/solr/example/example-DIH/solr/db/conf/schema.xml +++ b/solr/example/example-DIH/solr/db/conf/schema.xml @@ -167,7 +167,8 @@ - + + @@ -176,7 +177,8 @@ - + + @@ -191,7 +193,8 @@ - + + diff --git a/solr/example/example-DIH/solr/mail/conf/schema.xml b/solr/example/example-DIH/solr/mail/conf/schema.xml index 3e69b237ebb..a79a9349ce9 100644 --- a/solr/example/example-DIH/solr/mail/conf/schema.xml +++ b/solr/example/example-DIH/solr/mail/conf/schema.xml @@ -212,7 +212,8 @@ /> - + + @@ -225,7 +226,8 @@ /> - + + @@ -240,7 +242,8 @@ - + + diff --git a/solr/example/example-DIH/solr/rss/conf/schema.xml b/solr/example/example-DIH/solr/rss/conf/schema.xml index 2184e19b22b..522ff7a6703 100644 --- a/solr/example/example-DIH/solr/rss/conf/schema.xml +++ b/solr/example/example-DIH/solr/rss/conf/schema.xml @@ -167,7 +167,8 @@ - + + @@ -176,7 +177,8 @@ - + + @@ -191,7 +193,8 @@ - + + @@ -243,7 +246,8 @@ - + + @@ -252,7 +256,8 @@ - + + diff --git a/solr/example/example-DIH/solr/tika/conf/schema.xml b/solr/example/example-DIH/solr/tika/conf/schema.xml index 0be581f386a..4d023e71e97 100644 --- a/solr/example/example-DIH/solr/tika/conf/schema.xml +++ b/solr/example/example-DIH/solr/tika/conf/schema.xml @@ -167,7 +167,8 @@ - + @@ -176,7 +177,8 @@ - + diff --git a/solr/example/solr/conf/schema.xml b/solr/example/solr/conf/schema.xml index 74bbc8f4d4b..15f7c80fafc 100755 --- a/solr/example/solr/conf/schema.xml +++ b/solr/example/solr/conf/schema.xml @@ -231,7 +231,8 @@ /> - + + @@ -243,7 +244,8 @@ /> - + + @@ -257,7 +259,8 @@ - + + diff --git a/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java b/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java index efd9fdb9461..b114778c241 100644 --- a/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java +++ b/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java @@ -190,8 +190,8 @@ public class DocumentAnalysisRequestHandlerTest extends AnalysisRequestHandlerTe assertNotNull("Expecting the 'StopFilter' to be applied on the query for the 'text' field", tokenList); assertEquals("Query has only one token", 1, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("jumping", null, "", 0, 7, 1, null, false)); - tokenList = (List) queryResult.get("org.apache.lucene.analysis.snowball.SnowballFilter"); - assertNotNull("Expecting the 'SnowballFilter' to be applied on the query for the 'text' field", tokenList); + tokenList = (List) queryResult.get("org.apache.lucene.analysis.PorterStemFilter"); + assertNotNull("Expecting the 'PorterStemFilter' to be applied on the query for the 'text' field", tokenList); assertEquals("Query has only one token", 1, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("jump", null, "", 0, 7, 1, null, false)); indexResult = textResult.get("index"); @@ -231,8 +231,8 @@ public class DocumentAnalysisRequestHandlerTest extends AnalysisRequestHandlerTe assertToken(tokenList.get(1), new TokenInfo("jumped", null, "", 8, 14, 2, null, false)); assertToken(tokenList.get(2), new TokenInfo("over", null, "", 15, 19, 3, null, false)); assertToken(tokenList.get(3), new TokenInfo("dogs", null, "", 24, 28, 4, null, false)); - tokenList = valueResult.get("org.apache.lucene.analysis.snowball.SnowballFilter"); - assertNotNull("Expecting the 'SnowballFilter' to be applied on the index for the 'text' field", tokenList); + tokenList = valueResult.get("org.apache.lucene.analysis.PorterStemFilter"); + assertNotNull("Expecting the 'PorterStemFilter' to be applied on the index for the 'text' field", tokenList); assertEquals("Expecting 4 tokens", 4, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("fox", null, "", 4, 7, 1, null, false)); assertToken(tokenList.get(1), new TokenInfo("jump", null, "", 8, 14, 2, null, true)); diff --git a/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java b/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java index 95a8b116a7f..74c0a98abf6 100644 --- a/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java +++ b/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java @@ -173,8 +173,8 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB assertToken(tokenList.get(5), new TokenInfo("lazy", null, "", 34, 38, 6, null, false)); assertToken(tokenList.get(6), new TokenInfo("brown", null, "", 39, 44, 7, null, true)); assertToken(tokenList.get(7), new TokenInfo("dogs", null, "", 45, 49, 8, null, false)); - tokenList = indexPart.get("org.apache.lucene.analysis.snowball.SnowballFilter"); - assertNotNull("Expcting SnowballFilter analysis breakdown", tokenList); + tokenList = indexPart.get("org.apache.lucene.analysis.PorterStemFilter"); + assertNotNull("Expcting PorterStemFilter analysis breakdown", tokenList); assertEquals(tokenList.size(), 8); assertToken(tokenList.get(0), new TokenInfo("quick", null, "", 4, 9, 1, null, false)); assertToken(tokenList.get(1), new TokenInfo("red", null, "", 10, 13, 2, null, false)); @@ -208,8 +208,8 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB assertEquals(2, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("fox", null, "", 0, 3, 1, null, false)); assertToken(tokenList.get(1), new TokenInfo("brown", null, "", 4, 9, 2, null, false)); - tokenList = queryPart.get("org.apache.lucene.analysis.snowball.SnowballFilter"); - assertNotNull("Expcting SnowballFilter analysis breakdown", tokenList); + tokenList = queryPart.get("org.apache.lucene.analysis.PorterStemFilter"); + assertNotNull("Expcting PorterStemFilter analysis breakdown", tokenList); assertEquals(2, tokenList.size()); assertToken(tokenList.get(0), new TokenInfo("fox", null, "", 0, 3, 1, null, false)); assertToken(tokenList.get(1), new TokenInfo("brown", null, "", 4, 9, 2, null, false)); diff --git a/solr/src/test/test-files/solr/conf/schema-copyfield-test.xml b/solr/src/test/test-files/solr/conf/schema-copyfield-test.xml index f655686b818..2a6fe0d0938 100644 --- a/solr/src/test/test-files/solr/conf/schema-copyfield-test.xml +++ b/solr/src/test/test-files/solr/conf/schema-copyfield-test.xml @@ -113,10 +113,7 @@ - - + @@ -239,14 +236,14 @@ - + - + @@ -294,7 +291,7 @@ - + diff --git a/solr/src/test/test-files/solr/conf/schema-luceneMatchVersion.xml b/solr/src/test/test-files/solr/conf/schema-luceneMatchVersion.xml index bbd9948bb75..6f5b7dfc005 100644 --- a/solr/src/test/test-files/solr/conf/schema-luceneMatchVersion.xml +++ b/solr/src/test/test-files/solr/conf/schema-luceneMatchVersion.xml @@ -23,7 +23,7 @@ - + @@ -32,7 +32,7 @@ - + diff --git a/solr/src/test/test-files/solr/conf/schema-required-fields.xml b/solr/src/test/test-files/solr/conf/schema-required-fields.xml index bff445ce731..871c99563c1 100644 --- a/solr/src/test/test-files/solr/conf/schema-required-fields.xml +++ b/solr/src/test/test-files/solr/conf/schema-required-fields.xml @@ -104,10 +104,7 @@ - - + @@ -230,14 +227,14 @@ - + - + @@ -285,7 +282,7 @@ - + diff --git a/solr/src/test/test-files/solr/conf/schema-spellchecker.xml b/solr/src/test/test-files/solr/conf/schema-spellchecker.xml index a8305562a27..f6f9045c171 100644 --- a/solr/src/test/test-files/solr/conf/schema-spellchecker.xml +++ b/solr/src/test/test-files/solr/conf/schema-spellchecker.xml @@ -42,7 +42,7 @@ - + diff --git a/solr/src/test/test-files/solr/conf/schema-trie.xml b/solr/src/test/test-files/solr/conf/schema-trie.xml index b48e76bffe9..45440194d54 100644 --- a/solr/src/test/test-files/solr/conf/schema-trie.xml +++ b/solr/src/test/test-files/solr/conf/schema-trie.xml @@ -176,7 +176,8 @@ - + + @@ -185,7 +186,8 @@ - + + @@ -200,7 +202,8 @@ - + + diff --git a/solr/src/test/test-files/solr/conf/schema.xml b/solr/src/test/test-files/solr/conf/schema.xml index 019d300837e..159d1af992c 100644 --- a/solr/src/test/test-files/solr/conf/schema.xml +++ b/solr/src/test/test-files/solr/conf/schema.xml @@ -134,10 +134,7 @@ - - + @@ -272,14 +269,14 @@ - + - + @@ -289,14 +286,14 @@ - + - + @@ -357,7 +354,7 @@ - + diff --git a/solr/src/test/test-files/solr/conf/schema11.xml b/solr/src/test/test-files/solr/conf/schema11.xml index f018a13fabb..7c481990d83 100755 --- a/solr/src/test/test-files/solr/conf/schema11.xml +++ b/solr/src/test/test-files/solr/conf/schema11.xml @@ -167,7 +167,8 @@ - + + @@ -176,7 +177,8 @@ - + + @@ -191,7 +193,8 @@ - + + diff --git a/solr/src/test/test-files/solr/conf/schema12.xml b/solr/src/test/test-files/solr/conf/schema12.xml index 303ec9d2da9..c2cc72e1dcd 100755 --- a/solr/src/test/test-files/solr/conf/schema12.xml +++ b/solr/src/test/test-files/solr/conf/schema12.xml @@ -126,7 +126,8 @@ /> - + + @@ -138,7 +139,8 @@ /> - + + diff --git a/solr/src/test/test-files/solr/crazy-path-to-schema.xml b/solr/src/test/test-files/solr/crazy-path-to-schema.xml index 41439b8086f..d149e63dccf 100644 --- a/solr/src/test/test-files/solr/crazy-path-to-schema.xml +++ b/solr/src/test/test-files/solr/crazy-path-to-schema.xml @@ -32,7 +32,7 @@ - +