Hi, I'm looking to implement a slightly different style of faceting than what the SimpleFacets provides right now. Particularly, I'd like to implement something more like kayak.com or farechase.com, where facets are grouped together into buckets (e.g. airline, destination airport), but selection of an item in the group doesn't remove information about the other items in the group. For instance, when I select "America West", I should still see the number of results I would add to my search if I selected "United". However, if I select an item from a different group like destination airport, it should change the counts on the airports group.
Has anyone else built something like this yet? I've been modeling it in the DisMax syntax, having a user query U and several facet groups A, B, and C. Each facet group would have an associated filter query containing the user's current selection in the group, as well as facet fields and queries for the group. To get the facet counts for a group, I believe you'd want a DocSet intersecting the user's query and the filter queries for all other groups. So for instance, to get the facet counts for group A, I'd want a DocSet intersecting U, B, and C. I'd then run the facet queries and fields against that DocSet to produce the counts for group A. I'm thinking to do this by using getDocListAndSet to grab the DocSet for each distinct group, and then running the SimpleFacets code against that DocSet. I think if I keep score retrieval and sorting out of the flags, the cache should kick in for every DocSet after the first one, including calculation of the main query. Does this seem like a reasonable approach? If anyone else is looking for this functionality, I could also try to package it into something for the solr repository. I'm doing it in a custom request handler right now, so it might be a bit more difficult to specify the relationships between filter queries and facets in the URL syntax for general use. Thanks, -d -- View this message in context: http://www.nabble.com/grouped-facets-tf4823454.html#a13800156 Sent from the Solr - Dev mailing list archive at Nabble.com.
