lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Wu <...@wuservices.com>
Subject Faceted search with grouping counts and drill sideways with dynamic range faceting
Date Wed, 14 Oct 2015 03:43:28 GMT
Hi,

I'm just getting started with Lucene for e-commerce. Thanks to awesome blog
posts from Shai and Mike, I'm up and running with drill sideways, faceting
and single pass grouping, but am unsure how to smooth a few things out
around faceting and grouping.

Here's what I'm stuck on:

1. With block grouping, how do I get facets with values / counts for each
dimension where the count uses my grouping?

I was able to use TermGroupFacetCollector when I used two pass grouping,
but I don't see how to do this with block groups / single pass. Even with
TermGroupFacetCollector, I wasn't sure how to get group counts when I
wasn't using SortedSetDocValues on a given field.



2. Drill sideways with dynamic range faceting

Can I use dynamic range faceting with drill sideways? I'm trying to use
LongRangeFacetCounts, with a FacetsCollector but, when I run query that has
the following

drillDownQuery.add("lowestPriceCents",
NumericRangeQuery.newIntRange("lowestPriceCents", 500, 1000, true, true))

then I do something like

val facetsCollector = new FacetsCollector
searcher.search(query, facetsCollector)
new LongRangeFacetCounts("price", facetsCollector, Array(
    new LongRange("<5",           0, true,  5 * 100, false),
    new LongRange("5-10",   5 * 100, true, 10 * 100, false),
    new LongRange("10-50", 10 * 100, true, 50 * 100, false),
    new LongRange(">50",   50 * 100, true, Long.MaxValue, false)
  ): _*)

However, I just get facets as if I'm drilling down. Can I use
LongRangeFacetCounts with drill sideways to get counts for all ranges?



3. For multi valued facet dimensions, I'm getting a value / count of -1.

For a dimension where I set multivalued to true:
facetsConfig.setMultiValued("photoOrientation", true)

I noticed that I get -1 as the value / count for the whole dimension.

Is this expected? How do I get the actual count? In some sense, maybe this
doesn't quite matter how I have it now, because I actually want grouped
facet counts and not the non-grouped facet counts.



Any help or pointers is really appreciated!

Thanks,
Jon

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