The idea w/ drill down is you are running a "base query" (what the user actually searched for, originally) and then, if the user has clicked to drill down on any facet labels, you are also adding drill-down queries.
You pass the "base query" to the DrillDownQuery constructor. And, normally, to add drill-down queries, you would use the add method that takes only strings, when the user clicked on a dimension + label. The add method that takes a custom drill-down query is for more advanced use cases, where you are able to create your own query that accomplishes the same thing as drilling down by a label; e.g., for numeric range facets, you would use this method to pass a numeric range filter down. Have you seen the demo facet examples, e.g. https://github.com/apache/lucene-solr/blob/master/lucene/demo/src/java/org/apache/lucene/demo/facet/SimpleSortedSetFacetsExample.java ? Are you using SSDV facets or taxonomy facets? Mike McCandless http://blog.mikemccandless.com On Wed, Nov 16, 2016 at 5:29 PM, Matt Hicks <m...@outr.com> wrote: > My situation is that I simply don't understand how I'm supposed to pass a > `Query` into it. Just passing in a `new QueryParser(facetName, > standardAnalyzer)` to `drillDown.add(facetName, queryParser.parse("valid > query"))` just always returns zero items. I'm guessing it has to do with > needing a specific type of query? > > On Wed, Nov 16, 2016 at 4:05 PM Michael McCandless > <luc...@mikemccandless.com> wrote: >> >> Can you post a test case showing the unexpected behavior? >> >> Mike McCandless >> >> http://blog.mikemccandless.com >> >> On Wed, Nov 16, 2016 at 1:55 PM, Matt Hicks <m...@outr.com> wrote: >> > Is this simply not possible to accomplish or does nobody on this list >> > know? >> > >> > On Mon, Nov 14, 2016 at 2:39 PM Matt Hicks <m...@outr.com> wrote: >> > >> >> I'm trying to add a sub-query to my DrillDownQuery but I keep ending up >> >> with no results when I use add(String dim, Query subQuery). I'm trying >> >> to >> >> query the tags that start with a specific String. >> >> >> >> Any suggestions of how to do this would be greatly appreciated. I am >> >> using >> >> Lucene Core 6.3.0. >> >> >> >> Thank you >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org