CCK has a feature where integer fields can have a textual label in select lists and during rendering. We should support these sort of integer fields as facets.
CCK has a feature where integer fields can have a textual label in select lists and during rendering. We should support these sort of integer fields as facets.
Comments
Comment #1
moshe weitzman commentedWould the maintainers accept a patch for this?
Comment #2
JacobSingh commentedAbsolutely!
Comment #3
janusman commentedI would suggest that integers-as-facets can be involved in different use cases:
* Datestamps are clustered together into years/months/weeks/days/hours at different levels of specificity.
* Ages could be clustered into evenly-divided ranges (0-9, 10-19, 20-29, 30-higher)
* Numbers could just mean "group 1", "group 2", etc. with no clustering/grouping whatsoever.
I seems to me we would benefit by having a generic way to offer modules hooks to cluster items using Solr ranged queries.
Or am I dreaming? =)
Comment #4
jpmckinney commentedBetter support for ranged queries is a good idea.
Comment #5
pwolanin commentedComment #6
cpliakas commentedFacet API has the concept of "query type" plugins. The query types implemented by Apache Solr will be "term", "date", and "range". Therefore this will be supported via the Facet API module.
Comment #7
pwolanin commentedPer skype call w/ Chris, we might need an API change:
becomes
We'd add a new query type, something like 'range filter' to support the a range slider plugin without actually generating range facets.
We need to use http://wiki.apache.org/solr/StatsComponent to get min/max within the range (depending on user prefs)
Comment #8
cpliakas commentedAs per the comment above, a task has been posted at #1161434: Modify "query type" key in facet definition to accept an array. A corresponding task has been posted against Apache Solr at #1161444: Modify Facet API field definitions to reflect API change for the "query type" key.
Comment #9
dynamicdan commented+1 ... I would make great use of this and therefore help test it.
Comment #10
zambrey commentedSubscribing.
Comment #11
Anonymous (not verified) commented+1
Comment #12
cpliakas commentedSo just an architectural note here, Facet API is simply a facilitator here and already has an API that supports ranges queries (and any other queries) through it's query type plugin system. Each backend will have to create a query type plugin for range queries, so there is no stopping people from implementing this is Search API / Apache Solr. In terms of what Facet API has to do, it just has to figure out a way to associate multiple types with a single field in a way that won't confuse the UI.
Comment #13
cpliakas commentedMarking as fixed since Apace Solr Search Integration added this functionality at #1161444: Modify Facet API field definitions to reflect API change for the "query type" key. For technical specifics, look at the ApacheSolrFacetapiNumericRange class in the patch posted at http://drupal.org/node/1161444#comment-5227496 to see how range support was added in a way that is works with Facet API.