lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jigar Shah <jigaronl...@gmail.com>
Subject Re: DrillSideways accepting FacetCollector parameter
Date Wed, 09 Jul 2014 05:40:16 GMT
Usecase:

With below code i perform search.

DrillSideways drillSideWays = new DrillSideways(searcher, config,
engine.getTaxoReader());
DrillSidewaysResult result = drillSideWays.search(filterQuery, null, null,
first + limit, sort, true, true);

In above code i don't have reference to FacetCollector fc, which is used.
Consider i want to get LongRangeFacetCounts, which is based on
NumericDocValuesField.

facets = new LongRangeFacetCounts(facetField.getQueryName(), fc,
longRanges.toArray(new LongRange[longRanges
                            .size()]));

if i use below, i get access to current fc.

FacetsCollector fc = new FacetsCollector();
TopDocs topDocs = FacetsCollector.search(searcher, query, null, first +
limit, sort, true, true, fc);

Difference is if i use ' FacetsCollector.search(searcher, query, null,
first + limit, sort, true, true, fc);' i can get FacetCollector. This is
not true in case of DrillSideways.

Let me know if, there is already some other way provided.

Thanks,
Jigar Shah.






On Tue, Jul 8, 2014 at 8:15 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> We could do this, but what's the use case?
>
> E.g. DrillSideways also "hardwires" the drill-sideways collectors it
> creates ... do you control over those as well?  Maybe we could make
> methods in the DrillSideways class that you could override?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Tue, Jul 8, 2014 at 7:14 AM, Jigar Shah <jigaronline@gmail.com> wrote:
> > Currently Drillsideways provides following method:
> >
> > public DrillSidewaysResult search(DrillDownQuery query, Collector
> > hitCollector);
> >
> > Can same class provide following method ?
> >
> > public DrillSidewaysResult search(DrillDownQuery query, Collector
> > hitCollector, FacetsCollector facetCollector);
> >
> > Currently,
> >
> >  FacetsCollector drillDownCollector = new FacetsCollector();
> >
> > is created from API method
> >
> > public DrillSidewaysResult search(DrillDownQuery query, Collector
> > hitCollector) throws IOException
> >
> >  which can be parametrised ?
> >
> > It will help application to use same FacetsCollector to fetch other
> facets,
> > i.e. non sideways facets.
> >
> > Thanks,
> > Jigar Shah.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message