/** * @param filter The filter for the bucket that resulted in this context/domain. Can be null if * this is the root context. * @param domain The resulting set of documents for this facet. */ public FacetContext sub(Query filter, DocSet domain) { FacetContext ctx = new FacetContext(); ctx.parent = this; ctx.base = domain; ctx.filter = filter; // carry over from parent ctx.flags = flags; ctx.qcontext = qcontext; ctx.req = req; ctx.searcher = searcher; return ctx; }