gsmiller commented on a change in pull request #138: URL: https://github.com/apache/lucene/pull/138#discussion_r633758104
########## File path: lucene/facet/src/java/org/apache/lucene/facet/DrillDownQuery.java ########## @@ -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()]; Review comment: Got it. That makes sense @gautamworah96. In that case, what do you think of caching the built queries and keeping track if they've been modified since last being built? So `getDrillDownQueries` would first check a "dirty" status and build the queries only if the boolean clauses have been modified since last being built (or if they've never been built). This way repeated calls to `getDrillDownQueries` wouldn't unnecessarily rebuild them. This isn't important currently since the method is package-private and its use is tightly coupled with `DrillSideways`, but if this is being made public, callers could unknowingly be doing wasted work by calling this thing multiple times. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org