Skip to content

Commit

Permalink
LUCENE-9956: Make getBaseQuery, getDrillDownQueries API from DrillDow…
Browse files Browse the repository at this point in the history
…nQuery public
  • Loading branch information
Gautam Worah committed May 14, 2021
1 parent 9a17d67 commit 46300cf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ API Changes

* LUCENE-9843: Remove compression option on default codec's docvalues. (Jack Conradson)

* LUCENE-9956: Expose the getBaseQuery, getDrillDownQueries APIs from DrillDownQuery (Gautam Worah)

Improvements

* LUCENE-9687: Hunspell support improvements: add API for spell-checking and suggestions, support compound words,
Expand Down
15 changes: 13 additions & 2 deletions lucene/facet/src/java/org/apache/lucene/facet/DrillDownQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,22 @@ private BooleanQuery getBooleanQuery() {
return bq.build();
}

Query getBaseQuery() {
/**
* Returns the internal baseQuery of the DrillDownQuery
*
* @return The baseQuery used on initialization of DrillDownQuery
*/
public Query getBaseQuery() {
return baseQuery;
}

Query[] getDrillDownQueries() {
/**
* Returns the dimension queries added either via {@link #add(String, Query)} or {@link
* #add(String, String...)}
*
* @return The array of dimQueries
*/
public Query[] getDrillDownQueries() {
Query[] dimQueries = new Query[this.dimQueries.size()];
for (int i = 0; i < dimQueries.length; ++i) {
dimQueries[i] = this.dimQueries.get(i).build();
Expand Down

0 comments on commit 46300cf

Please sign in to comment.