RE: Solr Faceting with Name Values
Thank you Robi for the information. I will be looking into this esp. the implementation. Having to join the names together and then split them later is something I have to discuss with my team. O. O. Petersen, Robert wrote > 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 -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Faceting-with-Name-Values-tp4036872p4037201.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: Solr Faceting with Name Values
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 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.
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 > > 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.
RE: Solr Faceting with Name Values
Hi O.O., You don't need to add them all into the schema. You can use the wildcard fields like 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 -Original Message- From: O. Olson [mailto:olson_...@yahoo.it] Sent: Monday, January 28, 2013 1:42 PM To: solr-user@lucene.apache.org Subject: Solr Faceting with Name Values Hi, We are looking at putting our Product Catalog into Solr. Our Product Catalog involves a Product, and a number of [Name, Value] pairs – which represent attributes of a particular product. The attribute names are standard along a certain Product Category, but they are too numerous to put into the schema. I would like to add faceting queries on these attributes. For e.g. Product 1: Name: Cannon Scanner Category: Office Machines Attribute 1 Name: Function Attribute 1 Value: Scanner Attribute 2 Name: PC Connection Attribute 2 Value: USB Attribute 3 Name: Scan Speed (ppm) Attribute 3 Value: 2 Product 2: Name: HP Printer Category: Office Machines Attribute 1 Name: Function Attribute 1 Value: Printer Attribute 2 Name: PC Connection Attribute 2 Value: LAN Attribute 3 Name: Print Speed (ppm) Attribute 3 Value: 35 I would like to know if there would be an easy way to retrieve the Facet Counts related to “PC Connection”. I think this should give me the counts for LAN, USB, Wi-Fi etc. for the way products connect to a PC. If I would put “PC Connection” into a separate field in the schema in Solr, I can append something like the following to the end of my query: &facet=true&facet.field=PC+Connection However, there are too many attribute names like “PC Connection”. Is there any way to get the facet counts without putting “PC Connection” into a separate field? How should I structure my schema to get these results? Thank you all for your help. O. O. -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Faceting-with-Name-Values-tp4036872.html Sent from the Solr - User mailing list archive at Nabble.com.
Solr Faceting with Name Values
Hi, We are looking at putting our Product Catalog into Solr. Our Product Catalog involves a Product, and a number of [Name, Value] pairs – which represent attributes of a particular product. The attribute names are standard along a certain Product Category, but they are too numerous to put into the schema. I would like to add faceting queries on these attributes. For e.g. Product 1: Name: Cannon Scanner Category: Office Machines Attribute 1 Name: Function Attribute 1 Value: Scanner Attribute 2 Name: PC Connection Attribute 2 Value: USB Attribute 3 Name: Scan Speed (ppm) Attribute 3 Value: 2 Product 2: Name: HP Printer Category: Office Machines Attribute 1 Name: Function Attribute 1 Value: Printer Attribute 2 Name: PC Connection Attribute 2 Value: LAN Attribute 3 Name: Print Speed (ppm) Attribute 3 Value: 35 I would like to know if there would be an easy way to retrieve the Facet Counts related to “PC Connection”. I think this should give me the counts for LAN, USB, Wi-Fi etc. for the way products connect to a PC. If I would put “PC Connection” into a separate field in the schema in Solr, I can append something like the following to the end of my query: &facet=true&facet.field=PC+Connection However, there are too many attribute names like “PC Connection”. Is there any way to get the facet counts without putting “PC Connection” into a separate field? How should I structure my schema to get these results? Thank you all for your help. O. O. -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Faceting-with-Name-Values-tp4036872.html Sent from the Solr - User mailing list archive at Nabble.com.