You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Teun Duynstee (JIRA)" <ji...@apache.org> on 2013/02/24 12:24:12 UTC

[jira] [Created] (SOLR-4496) Support for faceting on the start of values

Teun Duynstee created SOLR-4496:
-----------------------------------

             Summary: Support for faceting on the start of values
                 Key: SOLR-4496
                 URL: https://issues.apache.org/jira/browse/SOLR-4496
             Project: Solr
          Issue Type: Improvement
          Components: search
            Reporter: Teun Duynstee
            Priority: Minor


The SimpleFacets component supports the prefix parameter to return only facets starting with that prefix. This feature should (IMO) be complemented by two more parameters to make it much more usefull (names could be improved on of course):
- limitLength: will return facets for only the first x characters of the real facets. If the real values are AAA, CC and CCC, the limitLength=1 parameter would cause the facets A and C to be returned, with the sum of the counts. This could typpically be used for a UI that allows you to select a first letter for fields with many facets.
- limitDelim: this would not truncate on a fixed length, but on the occurence of a certain character after the prefix. This would allow the user to search for hierarchical fields without having to resort to including each level of the hierarchy at index analysis. This way, the value of the filed cat would be 'Comics>Marvel>Batman' and this would be found using prefix=Comics>&limitDelim=>. This would return the facet Marvel with the combined count for all undelying cat values.

I am working on a patch that would achieve this by postprocessing the resulting counts in getTermCounts(). However, this will not return the correct counts for multivalued fields. Also, the combination with field.limit is not easy. Any tips for how to implement this? I'm available to work on a patch. Or is it a bad adie anyway?


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org