lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r801751 - /lucene/solr/trunk/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java
Date Thu, 06 Aug 2009 18:09:57 GMT
Author: yonik
Date: Thu Aug  6 18:09:56 2009
New Revision: 801751

URL: http://svn.apache.org/viewvc?rev=801751&view=rev
Log:
SOLR-1340: DocumentAnalysisRequestHandler assumed text analysis for int field, couldn't handle
exceptions in analysis

Modified:
    lucene/solr/trunk/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java

Modified: lucene/solr/trunk/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java?rev=801751&r1=801750&r2=801751&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java
(original)
+++ lucene/solr/trunk/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java
Thu Aug  6 18:09:56 2009
@@ -128,6 +128,13 @@
     // the id field
     NamedList<NamedList<Object>> idResult = documentResult.get("id");
     assertNotNull("an analysis for the 'id' field should be returned", idResult);
+
+    NamedList<Object> queryResult;
+    List<NamedList> tokenList;
+    NamedList<Object> indexResult;
+    NamedList<List<NamedList>> valueResult;
+
+    /*** Much of this test seems invalid for a numeric "id" field
     NamedList<Object> queryResult = idResult.get("query");
     assertEquals("Only the default analyzer should be applied", 1, queryResult.size());
     String name = queryResult.getName(0);
@@ -136,6 +143,7 @@
     assertEquals("Query has only one token", 1, tokenList.size());
     assertToken(tokenList.get(0), new TokenInfo("JUMPING", null, "word", 0, 7, 1, null, false));
     NamedList<Object> indexResult = idResult.get("index");
+
     assertEquals("The id field has only a single value", 1, indexResult.size());
     NamedList<List<NamedList>> valueResult = (NamedList<List<NamedList>>)
indexResult.get("1");
     assertEquals("Only the default analyzer should be applied", 1, valueResult.size());
@@ -144,7 +152,8 @@
     tokenList = valueResult.getVal(0);
     assertEquals("The 'id' field value has only one token", 1, tokenList.size());
     assertToken(tokenList.get(0), new TokenInfo("1", null, "word", 0, 1, 1, null, false));
-
+    ***/
+  
     // the name field
     NamedList<NamedList<Object>> whitetokResult = documentResult.get("whitetok");
     assertNotNull("an analysis for the 'whitetok' field should be returned", whitetokResult);



Mime
View raw message