You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2017/07/26 22:25:21 UTC

[2/3] lucene-solr:branch_7x: SOLR-10760: fix Solrj tests that depended on Trie fields

SOLR-10760: fix Solrj tests that depended on Trie fields


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/90809f20
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/90809f20
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/90809f20

Branch: refs/heads/branch_7x
Commit: 90809f205d302b02d1487c2164d3ee6ab81ff17c
Parents: 1d77e4c
Author: Steve Rowe <sa...@apache.org>
Authored: Wed Jul 26 18:24:34 2017 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Wed Jul 26 18:25:04 2017 -0400

----------------------------------------------------------------------
 .../solr/client/solrj/SolrExampleTests.java     | 26 ++++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/90809f20/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
index 68392bf..3a57e5a 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
@@ -412,15 +412,15 @@ abstract public class SolrExampleTests extends SolrExampleTestsBase
 
     SolrQuery query = new SolrQuery();
     query.set(CommonParams.QT, "/analysis/field");
-    query.set(AnalysisParams.FIELD_TYPE, "int");
+    query.set(AnalysisParams.FIELD_TYPE, "pint");
     query.set(AnalysisParams.FIELD_VALUE, "ignore_exception");
     try {
       client.query( query );
-      Assert.fail("should have a number format exception");
+      Assert.fail("should have a server exception");
     }
     catch(SolrException ex) {
-      assertEquals(400, ex.code());
-      assertThat(ex.getMessage(), containsString("Invalid Number: ignore_exception"));
+      assertEquals(500, ex.code());
+      assertThat(ex.getMessage(), containsString(" Can't generate internal string in PointField. use PointField.toInternalByteRef"));
     }
     catch(Throwable t) {
       t.printStackTrace();
@@ -1937,14 +1937,14 @@ abstract public class SolrExampleTests extends SolrExampleTestsBase
     server.deleteByQuery("*:*");
 
     ArrayList<SolrInputDocument> docs = new ArrayList<>();
-    docs.add( makeTestDoc("id","1", "term_s", "YYYY", "group_s", "group1", "test_ti", "5", "test_tl", "10", "test_tf", "2000", "type_s", "parent"));
-    docs.add( makeTestDoc("id","2", "term_s","YYYY", "group_s", "group1", "test_ti", "50", "test_tl", "100", "test_tf", "200", "type_s", "child"));
-    docs.add( makeTestDoc("id","3", "term_s", "YYYY", "test_ti", "5000", "test_tl", "100", "test_tf", "200"));
-    docs.add( makeTestDoc("id","4", "term_s", "YYYY", "test_ti", "500", "test_tl", "1000", "test_tf", "2000"));
-    docs.add( makeTestDoc("id","5", "term_s", "YYYY", "group_s", "group2", "test_ti", "4", "test_tl", "10", "test_tf", "2000", "type_s", "parent"));
-    docs.add( makeTestDoc("id","6", "term_s","YYYY", "group_s", "group2", "test_ti", "10", "test_tl", "100", "test_tf", "200", "type_s", "child"));
-    docs.add( makeTestDoc("id","7", "term_s", "YYYY", "group_s", "group1", "test_ti", "1", "test_tl", "100000", "test_tf", "2000", "type_s", "child"));
-    docs.add( makeTestDoc("id","8", "term_s","YYYY", "group_s", "group2", "test_ti", "2", "test_tl", "100000", "test_tf", "200", "type_s", "child"));
+    docs.add( makeTestDoc("id","1", "term_s", "YYYY", "group_s", "group1", "test_i", "5", "test_l", "10", "test_f", "2000", "type_s", "parent"));
+    docs.add( makeTestDoc("id","2", "term_s","YYYY", "group_s", "group1", "test_i", "50", "test_l", "100", "test_f", "200", "type_s", "child"));
+    docs.add( makeTestDoc("id","3", "term_s", "YYYY", "test_i", "5000", "test_l", "100", "test_f", "200"));
+    docs.add( makeTestDoc("id","4", "term_s", "YYYY", "test_i", "500", "test_l", "1000", "test_f", "2000"));
+    docs.add( makeTestDoc("id","5", "term_s", "YYYY", "group_s", "group2", "test_i", "4", "test_l", "10", "test_f", "2000", "type_s", "parent"));
+    docs.add( makeTestDoc("id","6", "term_s","YYYY", "group_s", "group2", "test_i", "10", "test_l", "100", "test_f", "200", "type_s", "child"));
+    docs.add( makeTestDoc("id","7", "term_s", "YYYY", "group_s", "group1", "test_i", "1", "test_l", "100000", "test_f", "2000", "type_s", "child"));
+    docs.add( makeTestDoc("id","8", "term_s","YYYY", "group_s", "group2", "test_i", "2", "test_l", "100000", "test_f", "200", "type_s", "child"));
 
     server.add(docs);
     server.commit();
@@ -1953,7 +1953,7 @@ abstract public class SolrExampleTests extends SolrExampleTestsBase
     msParams.add("q", "*:*");
     msParams.add("fq", "{!collapse field=group_s}");
     msParams.add("defType", "edismax");
-    msParams.add("bf", "field(test_ti)");
+    msParams.add("bf", "field(test_i)");
     msParams.add("expand", "true");
     QueryResponse resp = server.query(msParams);