lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1302805 - /lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/schema/TextField.java
Date Tue, 20 Mar 2012 10:12:21 GMT
Author: rmuir
Date: Tue Mar 20 09:11:54 2012
New Revision: 1302805

URL: http://svn.apache.org/viewvc?rev=1302805&view=rev
Log:
tokenStream -> reusableTokenStream for MTQ analysis

Modified:
    lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/schema/TextField.java

Modified: lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/schema/TextField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/schema/TextField.java?rev=1302805&r1=1302804&r2=1302805&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/schema/TextField.java
(original)
+++ lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/schema/TextField.java
Tue Mar 20 09:11:54 2012
@@ -136,10 +136,10 @@ public class TextField extends FieldType
     TokenStream source;
     if (analyzerIn == null) analyzerIn = multiTermAnalyzer;
     try {
-      source = analyzerIn.tokenStream(field, new StringReader(part));
+      source = analyzerIn.reusableTokenStream(field, new StringReader(part));
       source.reset();
     } catch (IOException e) {
-      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Unable to initialize
TokenStream to analyze multiTerm term: " + part, e);
+      source = analyzerIn.tokenStream(field, new StringReader(part));
     }
     CharTermAttribute termAtt = source.getAttribute(CharTermAttribute.class);
     String termRet = "";



Mime
View raw message