From 174cc63bad411eace196a6c7028bdd24864fefed Mon Sep 17 00:00:00 2001 From: Jason Gerlowski Date: Mon, 11 Nov 2019 15:17:55 -0500 Subject: [PATCH] LUCENE-9026: Add getters to DocValuesTermsQuery --- .../apache/lucene/search/DocValuesTermsQuery.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesTermsQuery.java b/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesTermsQuery.java index 111148feec5..7903b757952 100644 --- a/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesTermsQuery.java +++ b/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesTermsQuery.java @@ -167,6 +167,20 @@ public class DocValuesTermsQuery extends Query implements Accountable { return builder.toString(); } + /** + * @return the name of the field searched by this query. + */ + public String getField() { + return field; + } + + /** + * @return the terms looked up by this query, prefix-encoded. + */ + public PrefixCodedTerms getTerms() { + return termData; + } + @Override public long ramBytesUsed() { return BASE_RAM_BYTES +