[
https://issues.apache.org/jira/browse/SOLR-6216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14067396#comment-14067396
]
Tomás Fernández Löbbe commented on SOLR-6216:
---------------------------------------------
Thanks for looking at the patch Erick.
bq. 1> I'm assuming this supports the f.<fieldname>.facet syntax, that's at a
higher level that this patch I'd guess
Yes, that's the way to set the intervals for a field. For example:
{code}f.test_l_dv.facet.interval.set=[10,20]{code}
bq. 2> There's a TODO in SimpleFacets ...
There are a couple of TODOs. In SimpleFacets, to add a comment about the
distributed case. I'll add that. In IntervalFacets there are a couple more. Two
of them I kept from the section of code I used from NumericFacets (maybe this
can be refactored in the future). Two TODOs are in the parsing method of the
interval. I see those two as possible future improvements, I don't think they
are necessary at this point.
bq. 3> Perhaps the most substantive question I have is the syntax. Why use '()'
for exclusive ranges and not '{}' like range facets do? Other things being
equal, it seems like this would be more consistent with other Solr syntax.
Well, that is true, but I guess in range queries “{}“ had to be used
because “()” was already being used for grouping clauses. I feel that “(10,20)”
is a better representation of an interval, but I see your point too to be
consistent with other Solr syntax. I think I’m OK either way. I was also
planning on adding support for local params on the interval to support setting
an arbitrary key, and if we use curly braces it would be more confusing:
{code}f.test_l_dv.facet.interval.set={!key=‘foo’}(10,20){code}
vs
{code}f.test_l_dv.facet.interval.set={!key=‘foo’}{10,20}{code}
> Better faceting for multiple intervals on DV fields
> ---------------------------------------------------
>
> Key: SOLR-6216
> URL: https://issues.apache.org/jira/browse/SOLR-6216
> Project: Solr
> Issue Type: Improvement
> Reporter: Tomás Fernández Löbbe
> Assignee: Erick Erickson
> Attachments: SOLR-6216.patch, SOLR-6216.patch, SOLR-6216.patch,
> SOLR-6216.patch, SOLR-6216.patch, SOLR-6216.patch, SOLR-6216.patch
>
>
> There are two ways to have faceting on values ranges in Solr right now:
> “Range Faceting” and “Query Faceting” (doing range queries). They both end up
> doing something similar:
> {code:java}
> searcher.numDocs(rangeQ , docs)
> {code}
> The good thing about this implementation is that it can benefit from caching.
> The bad thing is that it may be slow with cold caches, and that there will be
> a query for each of the ranges.
> A different implementation would be one that works similar to regular field
> faceting, using doc values and validating ranges for each value of the
> matching documents. This implementation would sometimes be faster than Range
> Faceting / Query Faceting, specially on cases where caches are not very
> effective, like on a high update rate, or where ranges change frequently.
> Functionally, the result should be exactly the same as the one obtained by
> doing a facet query for every interval
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]