[ 
https://issues.apache.org/jira/browse/SOLR-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14608334#comment-14608334
 ] 

Philip Willoughby commented on SOLR-247:
----------------------------------------

We have a concrete use-case for which this facility is required. We have a 
requirement to add arbitrary tags in arbitrary groups to products, and to be 
able to filter by those tags in the same way as you can filter our documents by 
more-structured attributes (e.g. price, discount, size, designer, etc). The 
semantics we want are to ignore the filter on property X when faceting property 
X.

With our known-in-advance fields this is easy: taking the example of designers 
we add an fq={!tag=did}designer_id:## for filtering and add 
facet.field={!ex=did}designer_id when looking for designer facets.

With these unknown-in-advance fields it is hard: what we had hoped to do was 
use facet.field=arbitrary_tag_* to generate the tag group facets and then if 
someone filters to group X=Y we'd add fq={!tag=atX}arbitrary_tag_X:Y for the 
filter and pass facet.field={!ex=atX}arbitrary_tag_X to get the facets. Of 
course in this case we would also want to pass facet.field=arbitrary_tag_* to 
get the facets over the other tags which means faceting arbitrary_tag_X twice, 
and creates a precedence problem.

We want, I think, facet.field=arbitrary_tag_* to work, but to be disregarded 
for any field it would otherwise match which is explicitly named as a 
facet.field

The other model we have considered is to combine every group and tag into a 
string like "group\u001Ftag", put them all into a field named tags and facet 
over that. But this means that we can't disregard the filters over group X when 
faceting group X while respecting them while faceting group Y etc without 
making multiple queries.

> Allow facet.field=* to facet on all fields (without knowing what they are)
> --------------------------------------------------------------------------
>
>                 Key: SOLR-247
>                 URL: https://issues.apache.org/jira/browse/SOLR-247
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>            Priority: Minor
>              Labels: beginners, newdev
>         Attachments: SOLR-247-FacetAllFields.patch, SOLR-247.patch, 
> SOLR-247.patch, SOLR-247.patch
>
>
> I don't know if this is a good idea to include -- it is potentially a bad 
> idea to use it, but that can be ok.
> This came out of trying to use faceting for the LukeRequestHandler top term 
> collecting.
> http://www.nabble.com/Luke-request-handler-issue-tf3762155.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to