You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2018/01/19 15:20:41 UTC

[2/2] lucene-solr:branch_7x: LUCENE-8130: switch to TermContext for 7.x

LUCENE-8130: switch to TermContext for 7.x


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

Branch: refs/heads/branch_7x
Commit: eb5ad78e0d64224a53e6bd4b50d165b3648914dc
Parents: 59f9ff7
Author: Mike McCandless <mi...@apache.org>
Authored: Fri Jan 19 10:20:24 2018 -0500
Committer: Mike McCandless <mi...@apache.org>
Committed: Fri Jan 19 10:20:24 2018 -0500

----------------------------------------------------------------------
 .../apache/lucene/index/TestTermContext.java    | 36 ++++++++++++++++++++
 .../org/apache/lucene/index/TestTermStates.java | 36 --------------------
 2 files changed, 36 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/eb5ad78e/lucene/core/src/test/org/apache/lucene/index/TestTermContext.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestTermContext.java b/lucene/core/src/test/org/apache/lucene/index/TestTermContext.java
new file mode 100644
index 0000000..049b487
--- /dev/null
+++ b/lucene/core/src/test/org/apache/lucene/index/TestTermContext.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.lucene.index;
+
+import org.apache.lucene.document.Document;
+import org.apache.lucene.store.Directory;
+import org.apache.lucene.util.IOUtils;
+import org.apache.lucene.util.LuceneTestCase;
+
+public class TestTermContext extends LuceneTestCase {
+
+  public void testToStringOnNullTermContext() throws Exception {
+    Directory dir = newDirectory();
+    RandomIndexWriter w = new RandomIndexWriter(random(), dir);
+    w.addDocument(new Document());
+    IndexReader r = w.getReader();
+    TermContext context = TermContext.build(r.getContext(), new Term("foo", "bar"));
+    assertEquals("TermContext\n  state=null\n", context.toString());
+    IOUtils.close(r, w, dir);
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/eb5ad78e/lucene/core/src/test/org/apache/lucene/index/TestTermStates.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestTermStates.java b/lucene/core/src/test/org/apache/lucene/index/TestTermStates.java
deleted file mode 100644
index a89fe7b..0000000
--- a/lucene/core/src/test/org/apache/lucene/index/TestTermStates.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.lucene.index;
-
-import org.apache.lucene.document.Document;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-
-public class TestTermStates extends LuceneTestCase {
-
-  public void testToStringOnNullTermState() throws Exception {
-    Directory dir = newDirectory();
-    RandomIndexWriter w = new RandomIndexWriter(random(), dir);
-    w.addDocument(new Document());
-    IndexReader r = w.getReader();
-    TermStates states = TermStates.build(r.getContext(), new Term("foo", "bar"), random().nextBoolean());
-    assertEquals("TermStates\n  state=null\n", states.toString());
-    IOUtils.close(r, w, dir);
-  }
-}