lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject [2/2] lucene-solr:branch_7x: LUCENE-8379: switch to TermQuery.getTermContext for 7.x
Date Thu, 05 Jul 2018 14:49:20 GMT
LUCENE-8379: switch to TermQuery.getTermContext 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/b9e064b9
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b9e064b9
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b9e064b9

Branch: refs/heads/branch_7x
Commit: b9e064b935b285d5969dd2e594570da1cc16440a
Parents: 51c8906
Author: Mike McCandless <mikemccand@apache.org>
Authored: Thu Jul 5 10:49:04 2018 -0400
Committer: Mike McCandless <mikemccand@apache.org>
Committed: Thu Jul 5 10:49:04 2018 -0400

----------------------------------------------------------------------
 lucene/core/src/java/org/apache/lucene/search/TermQuery.java | 4 ++--
 .../src/test/org/apache/lucene/search/TestTermQuery.java     | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b9e064b9/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/TermQuery.java b/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
index d04206a..bf912c5 100644
--- a/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
@@ -234,10 +234,10 @@ public class TermQuery extends Query {
     return buffer.toString();
   }
 
-  /** Returns the {@link TermStates} passed to the constructor, or null if it was not passed.
+  /** Returns the {@link TermContext} passed to the constructor, or null if it was not passed.
    *
    * @lucene.experimental */
-  public TermStates getTermStates() {
+  public TermContext getTermContext() {
     return perReaderTermState;
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b9e064b9/lucene/core/src/test/org/apache/lucene/search/TestTermQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestTermQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestTermQuery.java
index 5c67412..2aab93d 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestTermQuery.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestTermQuery.java
@@ -92,10 +92,10 @@ public class TestTermQuery extends LuceneTestCase {
     IOUtils.close(reader, w, dir);
   }
 
-  public void testGetTermStates() throws Exception {
+  public void testGetTermContext() throws Exception {
 
     // no term states:
-    assertNull(new TermQuery(new Term("foo", "bar")).getTermStates());
+    assertNull(new TermQuery(new Term("foo", "bar")).getTermContext());
 
     Directory dir = newDirectory();
     RandomIndexWriter w = new RandomIndexWriter(random(), dir, newIndexWriterConfig().setMergePolicy(NoMergePolicy.INSTANCE));
@@ -117,8 +117,8 @@ public class TestTermQuery extends LuceneTestCase {
     IndexSearcher noSeekSearcher = new IndexSearcher(noSeekReader);
     Query query = new TermQuery(new Term("foo", "bar"));
     TermQuery queryWithContext = new TermQuery(new Term("foo", "bar"),
-        TermStates.build(reader.getContext(), new Term("foo", "bar"), true));
-    assertNotNull(queryWithContext.getTermStates());
+        TermContext.build(reader.getContext(), new Term("foo", "bar")));
+    assertNotNull(queryWithContext.getTermContext());
     IOUtils.close(reader, w, dir);
   }
 


Mime
View raw message