On Tue, 2007-06-19 at 19:16 +0200, Thomas Traeger wrote: > Hi, > > I'm also just at that point where I think I need a wildcard facet.field > parameter (or someone points out another solution for my problem...). > Here is my situation: > > I have many products of different types with totally different > attributes. There are currently more than 300 attributes.... > I use dynamic fields to import the attributes into solr without having > to define a specific field for each attribute. Now when I make a query I > would like to get back all facet.fields that are relevant for that query. > > I think it would be really nice, if I don't have to know which facets > fields are there at query time, instead just import attributes into > dynamic fields, get the relevant facets back and decide in the frontend > which to display and how... Do you really need all facets in the frontend?
Would it be a solution to have a facet ranking in the field definitions, and then decide at query time, on which fields to facet on? This would need an additional query parameter like facet.query.count. E.g. if you have a query with q=foo+AND+prop1:bar+AND+prop2:baz and you have fields prop1 with facet-ranking 100 prop2 with facet-ranking 90 prop3 with facet-ranking 80 prop4 with facet-ranking 70 prop5 with facet-ranking 60 then you might decide not to facet on prop1 and prop2 as you have already a constraint on it, but to facet on prop3 and prop4 if facet.query.count is 2. Just thinking about that... :) Cheers, Martin > > What do the experts think about this? > > Tom > -- Martin Grotzke http://www.javakaffee.de/blog/
signature.asc
Description: This is a digitally signed message part