From aaba39e3b7c70bd1f9d6217ea664a4f9ec21d8c0 Mon Sep 17 00:00:00 2001 From: Doug Cutting Date: Fri, 25 Feb 2005 17:39:02 +0000 Subject: [PATCH] Added accessor methods, as suggested by Kevin Burton. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@155349 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/search/IndexSearcher.java | 5 +++++ src/java/org/apache/lucene/search/MultiSearcher.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/java/org/apache/lucene/search/IndexSearcher.java b/src/java/org/apache/lucene/search/IndexSearcher.java index 80822568058..b547ca64758 100644 --- a/src/java/org/apache/lucene/search/IndexSearcher.java +++ b/src/java/org/apache/lucene/search/IndexSearcher.java @@ -54,6 +54,11 @@ public class IndexSearcher extends Searcher { this.closeReader = closeReader; } + /** Return the {@link IndexReader} this searches. */ + public IndexReader getIndexReader() { + return reader; + } + /** * Note that the underlying IndexReader is not closed, if * IndexSearcher was constructed with IndexSearcher(IndexReader r). diff --git a/src/java/org/apache/lucene/search/MultiSearcher.java b/src/java/org/apache/lucene/search/MultiSearcher.java index dc1cc803108..5a3560dd333 100644 --- a/src/java/org/apache/lucene/search/MultiSearcher.java +++ b/src/java/org/apache/lucene/search/MultiSearcher.java @@ -43,6 +43,11 @@ public class MultiSearcher extends Searcher { starts[searchables.length] = maxDoc; } + /** Return the array of {@link Searchable}s this searches. */ + public Searchable[] getSearchables() { + return searchables; + } + protected int[] getStarts() { return starts; }