Hi O.O 1. Yes faceting on field function_s would return all the facet values in the search results with their counts. 2. You would probably have to join the names together with a special character and then split them later in the UI. 3. I'm sure there is a way to query the index for all defined fields. The admin schema browser page does this exact thing.
Resources for further exploration: http://wiki.apache.org/solr/SolrFacetingOverview http://wiki.apache.org/solr/SimpleFacetParameters http://searchhub.org/2009/09/02/faceted-search-with-solr/ http://wiki.apache.org/solr/HierarchicalFaceting http://lucidworks.lucidimagination.com/display/solr/Faceting Have fun! Robi -----Original Message----- From: O. Olson [mailto:olson_...@yahoo.it] Sent: Monday, January 28, 2013 3:11 PM To: solr-user@lucene.apache.org Subject: RE: Solr Faceting with Name Values Thank you Robi. Your idea seems good but I have a few questions: 1. From your description, I would create a field “Function_s” with the value “Scanner” and “Function_s” with the value “Printer” for my two Products. This seems good. Is it possible for you give me a query for this dynamic field. For e.g., could I do something like: &facet=true&facet.field=Function_s I would like this to tell me how many of the products are Scanners and how many of the products are Printers. 2. Many of my Attribute Names have spaces e.g. “PC Connection”, or even brackets and slashes e.g. “Scan Speed (ppm)”. Would there be a problem putting these in a dynamic field name? 3. Is it possible to query for the possible list of dynamic fieldnames? I might need this when creating a list of attributes. Thanks again Robi. O. O. ---------------------------------------------- Petersen, Robert wrote > Hi O.O., > > You don't need to add them all into the schema. You can use the > wildcard fields like <dynamicField name="*_s" type="string" > indexed="true" stored="true" /> to hold them. You can then have the > attribute name be the part of the wildcard and the attribute value be > the field contents. So you could have fields like Function_s:Scanner > etc and then you could ask for facets which are relevant based upon > query or category. > > That would be a much more straightforward approach and much easier to > facet on. Hope that helps a little bit. > > -Robi -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Faceting-with-Name-Values-tp4036872p4036904.html Sent from the Solr - User mailing list archive at Nabble.com.