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:20 UTC
[1/3] lucene-solr:master: SOLR-10760: fix Solrj tests that depended
on Trie fields
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7_0 fc356c8a3 -> 00b27f4ca
refs/heads/branch_7x 1d77e4cb2 -> 90809f205
refs/heads/master 42c670372 -> f6b0f9656
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/f6b0f965
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f6b0f965
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f6b0f965
Branch: refs/heads/master
Commit: f6b0f965681b43387c0c4e37952d89ac731ce782
Parents: 42c6703
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:24:34 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/f6b0f965/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);
[2/3] lucene-solr:branch_7x: SOLR-10760: fix Solrj tests that
depended on Trie fields
Posted by sa...@apache.org.
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);
[3/3] lucene-solr:branch_7_0: SOLR-10760: fix Solrj tests that
depended on Trie fields
Posted by sa...@apache.org.
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/00b27f4c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/00b27f4c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/00b27f4c
Branch: refs/heads/branch_7_0
Commit: 00b27f4ca381f4b0277bd7aa6c4c74e34713b716
Parents: fc356c8
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:12 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/00b27f4c/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);