Skip to content

Apache Lucene open-source search software

LUCENE-4945: added some getters to CustomScoreQuery

David Wayne Smiley383af5c08570
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java b/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
index 663c3e8ce45..5cf2c740421 100755
--- a/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
@@ -387,6 +387,16 @@ public class CustomScoreQuery extends Query {
this.strict = strict;
}
+ /** The sub-query that CustomScoreQuery wraps, affecting both the score and which documents match. */
+ public Query getSubQuery() {
+ return subQuery;
+ }
+
+ /** The scoring queries that only affect the score of CustomScoreQuery. */
+ public Query[] getScoringQueries() {
+ return scoringQueries;
+ }
+
/**
* A short name of this query, used in {@link #toString(String)}.
*/