RE: To truncate or not to truncate (group.truncate vs. facet)
You may be able to fake your price requirements by rounding at index time. For instance, if you wanted 10-19$, 20-29$, 30+ then you create a second price field specifically for faceting, round down to 10, 20, 30 at index time and then facet on that field. Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Monday, April 09, 2012 7:26 PM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) Is this planned as a future feature? Is it in the bug tracker as a feature yet..just wondering how long until it is a feature. I could live without price counts for a bit. Sent from my phone - Reply message - From: Martijn v Groningen-2 [via Lucene] ml-node+s472066n3897768...@n3.nabble.com Date: Mon, Apr 9, 2012 3:31 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com The group.facet option only works for field facets (facet.field). Others facets types (query, range and pivot) aren't supported yet. The group.facet works for both single and multivalued fields specified in the facet.field parameter. Martijn On 9 April 2012 20:58, danjfoley d...@micamedia.com wrote: I am using group.facet and it works fine for regular facet.field but not for facet.query Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897487...@n3.nabble.com Date: Mon, Apr 9, 2012 1:38 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com One other thing, I believe that you need to be using facet.field on single valued string fields for group.facet to function properly. Are the fields you're faceting on multiValued=false? Cody -Original Message- From: Young, Cody [mailto:cody.yo...@move.com] Sent: Monday, April 09, 2012 10:36 AM To: solr-user@lucene.apache.org Subject: RE: To truncate or not to truncate (group.truncate vs. facet) You tried adding the parameter group.facet=true ? Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Monday, April 09, 2012 10:09 AM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I did get this working with version 4. However my facet queries still don't group. Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897366...@n3.nabble.com Date: Mon, Apr 9, 2012 12:45 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com I believe you're looking for what's called, Matrix Counts Please see this JIRA issue. To my knowledge it has been committed in trunk but not 3.x. https://issues.apache.org/jira/browse/SOLR-2898 This feature is accessed by using group.facet=true Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Saturday, April 07, 2012 7:02 PM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how can I make this happen now? There are all sorts of ecommerce systems out there that facet exactly how i'm asking. i thought solr is supposed to be the very best fastest search system, yet it doesn't seem to be able to facet correct for items with multiple values? Am i indexing my data wrong? how can i make this happen? -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-grou p-truncate-vs-facet-tp3838797p3893744.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-grou p-truncate-vs-facet-tp3838797p3897366.html To unsubscribe from To truncate or not to truncate (group.truncate vs. facet, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro
Re: To truncate or not to truncate (group.truncate vs. facet)
Good idea. In fact you could fake anything this way. Pre-render the facet values on input. On Tue, Apr 10, 2012 at 1:58 PM, Young, Cody [via Lucene] ml-node+s472066n3900432...@n3.nabble.com wrote: You may be able to fake your price requirements by rounding at index time. For instance, if you wanted 10-19$, 20-29$, 30+ then you create a second price field specifically for faceting, round down to 10, 20, 30 at index time and then facet on that field. Cody -Original Message- From: danjfoley [mailto:[hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=0] Sent: Monday, April 09, 2012 7:26 PM To: [hidden email] http://user/SendEmail.jtp?type=nodenode=3900432i=1 Subject: Re: To truncate or not to truncate (group.truncate vs. facet) Is this planned as a future feature? Is it in the bug tracker as a feature yet..just wondering how long until it is a feature. I could live without price counts for a bit. Sent from my phone - Reply message - From: Martijn v Groningen-2 [via Lucene] [hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=2 Date: Mon, Apr 9, 2012 3:31 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley [hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=3 The group.facet option only works for field facets (facet.field). Others facets types (query, range and pivot) aren't supported yet. The group.facet works for both single and multivalued fields specified in the facet.field parameter. Martijn On 9 April 2012 20:58, danjfoley [hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=4 wrote: I am using group.facet and it works fine for regular facet.field but not for facet.query Sent from my phone - Reply message - From: Young, Cody [via Lucene] [hidden email] http://user/SendEmail.jtp?type=nodenode=3900432i=5 Date: Mon, Apr 9, 2012 1:38 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley [hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=6 One other thing, I believe that you need to be using facet.field on single valued string fields for group.facet to function properly. Are the fields you're faceting on multiValued=false? Cody -Original Message- From: Young, Cody [mailto:[hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=7] Sent: Monday, April 09, 2012 10:36 AM To: [hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=8 Subject: RE: To truncate or not to truncate (group.truncate vs. facet) You tried adding the parameter group.facet=true ? Cody -Original Message- From: danjfoley [mailto:[hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=9] Sent: Monday, April 09, 2012 10:09 AM To: [hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=10 Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I did get this working with version 4. However my facet queries still don't group. Sent from my phone - Reply message - From: Young, Cody [via Lucene] [hidden email] http://user/SendEmail.jtp?type=nodenode=3900432i=11 Date: Mon, Apr 9, 2012 12:45 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley [hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=12 I believe you're looking for what's called, Matrix Counts Please see this JIRA issue. To my knowledge it has been committed in trunk but not 3.x. https://issues.apache.org/jira/browse/SOLR-2898 This feature is accessed by using group.facet=true Cody -Original Message- From: danjfoley [mailto:[hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=13] Sent: Saturday, April 07, 2012 7:02 PM To: [hidden email]http://user/SendEmail.jtp?type=nodenode=3900432i=14 Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how
RE: To truncate or not to truncate (group.truncate vs. facet)
I believe you're looking for what's called, Matrix Counts Please see this JIRA issue. To my knowledge it has been committed in trunk but not 3.x. https://issues.apache.org/jira/browse/SOLR-2898 This feature is accessed by using group.facet=true Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Saturday, April 07, 2012 7:02 PM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how can I make this happen now? There are all sorts of ecommerce systems out there that facet exactly how i'm asking. i thought solr is supposed to be the very best fastest search system, yet it doesn't seem to be able to facet correct for items with multiple values? Am i indexing my data wrong? how can i make this happen? -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3893744.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
I did get this working with version 4. However my facet queries still don't group. Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897366...@n3.nabble.com Date: Mon, Apr 9, 2012 12:45 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com I believe you're looking for what's called, Matrix Counts Please see this JIRA issue. To my knowledge it has been committed in trunk but not 3.x. https://issues.apache.org/jira/browse/SOLR-2898 This feature is accessed by using group.facet=true Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Saturday, April 07, 2012 7:02 PM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how can I make this happen now? There are all sorts of ecommerce systems out there that facet exactly how i'm asking. i thought solr is supposed to be the very best fastest search system, yet it doesn't seem to be able to facet correct for items with multiple values? Am i indexing my data wrong? how can i make this happen? -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3893744.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897366.html To unsubscribe from To truncate or not to truncate (group.truncate vs. facet, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3838797code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wtMTEyNjQzODIyNg== -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897422.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: To truncate or not to truncate (group.truncate vs. facet)
You tried adding the parameter group.facet=true ? Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Monday, April 09, 2012 10:09 AM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I did get this working with version 4. However my facet queries still don't group. Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897366...@n3.nabble.com Date: Mon, Apr 9, 2012 12:45 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com I believe you're looking for what's called, Matrix Counts Please see this JIRA issue. To my knowledge it has been committed in trunk but not 3.x. https://issues.apache.org/jira/browse/SOLR-2898 This feature is accessed by using group.facet=true Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Saturday, April 07, 2012 7:02 PM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how can I make this happen now? There are all sorts of ecommerce systems out there that facet exactly how i'm asking. i thought solr is supposed to be the very best fastest search system, yet it doesn't seem to be able to facet correct for items with multiple values? Am i indexing my data wrong? how can i make this happen? -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3893744.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897366.html To unsubscribe from To truncate or not to truncate (group.truncate vs. facet, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3838797code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wtMTEyNjQzODIyNg== -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897422.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: To truncate or not to truncate (group.truncate vs. facet)
One other thing, I believe that you need to be using facet.field on single valued string fields for group.facet to function properly. Are the fields you're faceting on multiValued=false? Cody -Original Message- From: Young, Cody [mailto:cody.yo...@move.com] Sent: Monday, April 09, 2012 10:36 AM To: solr-user@lucene.apache.org Subject: RE: To truncate or not to truncate (group.truncate vs. facet) You tried adding the parameter group.facet=true ? Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Monday, April 09, 2012 10:09 AM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I did get this working with version 4. However my facet queries still don't group. Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897366...@n3.nabble.com Date: Mon, Apr 9, 2012 12:45 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com I believe you're looking for what's called, Matrix Counts Please see this JIRA issue. To my knowledge it has been committed in trunk but not 3.x. https://issues.apache.org/jira/browse/SOLR-2898 This feature is accessed by using group.facet=true Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Saturday, April 07, 2012 7:02 PM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how can I make this happen now? There are all sorts of ecommerce systems out there that facet exactly how i'm asking. i thought solr is supposed to be the very best fastest search system, yet it doesn't seem to be able to facet correct for items with multiple values? Am i indexing my data wrong? how can i make this happen? -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3893744.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897366.html To unsubscribe from To truncate or not to truncate (group.truncate vs. facet, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3838797code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wtMTEyNjQzODIyNg== -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897422.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
I am using group.facet and it works fine for regular facet.field but not for facet.query Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897487...@n3.nabble.com Date: Mon, Apr 9, 2012 1:38 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com One other thing, I believe that you need to be using facet.field on single valued string fields for group.facet to function properly. Are the fields you're faceting on multiValued=false? Cody -Original Message- From: Young, Cody [mailto:cody.yo...@move.com] Sent: Monday, April 09, 2012 10:36 AM To: solr-user@lucene.apache.org Subject: RE: To truncate or not to truncate (group.truncate vs. facet) You tried adding the parameter group.facet=true ? Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Monday, April 09, 2012 10:09 AM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I did get this working with version 4. However my facet queries still don't group. Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897366...@n3.nabble.com Date: Mon, Apr 9, 2012 12:45 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com I believe you're looking for what's called, Matrix Counts Please see this JIRA issue. To my knowledge it has been committed in trunk but not 3.x. https://issues.apache.org/jira/browse/SOLR-2898 This feature is accessed by using group.facet=true Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Saturday, April 07, 2012 7:02 PM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how can I make this happen now? There are all sorts of ecommerce systems out there that facet exactly how i'm asking. i thought solr is supposed to be the very best fastest search system, yet it doesn't seem to be able to facet correct for items with multiple values? Am i indexing my data wrong? how can i make this happen? -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3893744.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897366.html To unsubscribe from To truncate or not to truncate (group.truncate vs. facet, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3838797code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wtMTEyNjQzODIyNg== -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897422.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897487.html To unsubscribe from To truncate or not to truncate (group.truncate vs. facet, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3838797code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wtMTEyNjQzODIyNg== -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897694.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
The group.facet option only works for field facets (facet.field). Others facets types (query, range and pivot) aren't supported yet. The group.facet works for both single and multivalued fields specified in the facet.field parameter. Martijn On 9 April 2012 20:58, danjfoley d...@micamedia.com wrote: I am using group.facet and it works fine for regular facet.field but not for facet.query Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897487...@n3.nabble.com Date: Mon, Apr 9, 2012 1:38 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com One other thing, I believe that you need to be using facet.field on single valued string fields for group.facet to function properly. Are the fields you're faceting on multiValued=false? Cody -Original Message- From: Young, Cody [mailto:cody.yo...@move.com] Sent: Monday, April 09, 2012 10:36 AM To: solr-user@lucene.apache.org Subject: RE: To truncate or not to truncate (group.truncate vs. facet) You tried adding the parameter group.facet=true ? Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Monday, April 09, 2012 10:09 AM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I did get this working with version 4. However my facet queries still don't group. Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897366...@n3.nabble.com Date: Mon, Apr 9, 2012 12:45 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com I believe you're looking for what's called, Matrix Counts Please see this JIRA issue. To my knowledge it has been committed in trunk but not 3.x. https://issues.apache.org/jira/browse/SOLR-2898 This feature is accessed by using group.facet=true Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Saturday, April 07, 2012 7:02 PM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how can I make this happen now? There are all sorts of ecommerce systems out there that facet exactly how i'm asking. i thought solr is supposed to be the very best fastest search system, yet it doesn't seem to be able to facet correct for items with multiple values? Am i indexing my data wrong? how can i make this happen? -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3893744.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897366.html To unsubscribe from To truncate or not to truncate (group.truncate vs. facet, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3838797code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wtMTEyNjQzODIyNg== -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897422.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897487.html To unsubscribe from To truncate or not to truncate (group.truncate vs. facet, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3838797code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wtMTEyNjQzODIyNg== -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897694.html
Re: To truncate or not to truncate (group.truncate vs. facet)
Is this planned as a future feature? Is it in the bug tracker as a feature yet..just wondering how long until it is a feature. I could live without price counts for a bit. Sent from my phone - Reply message - From: Martijn v Groningen-2 [via Lucene] ml-node+s472066n3897768...@n3.nabble.com Date: Mon, Apr 9, 2012 3:31 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com The group.facet option only works for field facets (facet.field). Others facets types (query, range and pivot) aren't supported yet. The group.facet works for both single and multivalued fields specified in the facet.field parameter. Martijn On 9 April 2012 20:58, danjfoley d...@micamedia.com wrote: I am using group.facet and it works fine for regular facet.field but not for facet.query Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897487...@n3.nabble.com Date: Mon, Apr 9, 2012 1:38 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com One other thing, I believe that you need to be using facet.field on single valued string fields for group.facet to function properly. Are the fields you're faceting on multiValued=false? Cody -Original Message- From: Young, Cody [mailto:cody.yo...@move.com] Sent: Monday, April 09, 2012 10:36 AM To: solr-user@lucene.apache.org Subject: RE: To truncate or not to truncate (group.truncate vs. facet) You tried adding the parameter group.facet=true ? Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Monday, April 09, 2012 10:09 AM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I did get this working with version 4. However my facet queries still don't group. Sent from my phone - Reply message - From: Young, Cody [via Lucene] ml-node+s472066n3897366...@n3.nabble.com Date: Mon, Apr 9, 2012 12:45 pm Subject: To truncate or not to truncate (group.truncate vs. facet) To: danjfoley d...@micamedia.com I believe you're looking for what's called, Matrix Counts Please see this JIRA issue. To my knowledge it has been committed in trunk but not 3.x. https://issues.apache.org/jira/browse/SOLR-2898 This feature is accessed by using group.facet=true Cody -Original Message- From: danjfoley [mailto:d...@micamedia.com] Sent: Saturday, April 07, 2012 7:02 PM To: solr-user@lucene.apache.org Subject: Re: To truncate or not to truncate (group.truncate vs. facet) I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how can I make this happen now? There are all sorts of ecommerce systems out there that facet exactly how i'm asking. i thought solr is supposed to be the very best fastest search system, yet it doesn't seem to be able to facet correct for items with multiple values? Am i indexing my data wrong? how can i make this happen? -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3893744.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897366.html To unsubscribe from To truncate or not to truncate (group.truncate vs. facet, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3838797code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wtMTEyNjQzODIyNg== -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3897422.html Sent from the Solr - User mailing list archive at Nabble.com. ___ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate
Re: To truncate or not to truncate (group.truncate vs. facet)
I've been searching for a solution to my issue, and this seems to come closest to it. But not exactly. I am indexing clothing. Each article of clothing comes in many sizes and colors, and can belong to any number of categories. For example take the following: I add 6 documents to solr as follows: product, color, size, category shirt A, red, small, valentines day shirt A, red, large, valentines day shirt A, blue, small, valentines day shirt A, blue, large, valentines day shirt A, green, small, valentines day shirt A, green, large, valentines day I'd like my facet counts to return as follows: color red (1) blue (1) green (1) size small (1) large (1) category valentines day (1) But they come back like this: color: red (2) blue (2) green (2) size: small (2) large (2) category valentines day (6) I see the group.facet parameter in version 4.0 does exactly this. However how can I make this happen now? There are all sorts of ecommerce systems out there that facet exactly how i'm asking. i thought solr is supposed to be the very best fastest search system, yet it doesn't seem to be able to facet correct for items with multiple values? Am i indexing my data wrong? how can i make this happen? -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3893744.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
Faceting is orthogonal to grouping, so be careful what you ask for. So adding faceting would be easy, the only reason I suggested grouping is your requirement that your brands be just a count of the number of distinct ones found, not the number of matching docs. So a really simple solution would be to forget about grouping and just facet. Then have your application change the counts for all the brand entries to 1. Best Erick On Mon, Mar 19, 2012 at 5:23 PM, rasser r...@vertica.dk wrote: I see your point. If I understand it correct it will however mean that i need to return 10(brands)x100(resultToShow) = 1000 docs to facilitate that all 100 results to show is of the same brand. Correnct? And tomorrow (or later) the customer will also want a facet on 5 new fields eg. production year. How could this be handled with the above approach? Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3840406.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
Thanks for taking the time to help me Erick! Just to clarify my desired behavior from the facets. This is the index, notice color is multivalued to represent a model of car that has more than one color: doc field name=skuAudi A4/field field name=brandaudi/field field name=variant_idA4_black/field field name=colorblack/field field name=colorwhite/field /doc doc field name=skuAudi A4/field field name=brandaudi/field field name=variant_idA4_white/field field name=colorwhite/field /doc doc field name=skuVolvo V50/field field name=brandvolvo/field field name=variant_idVolvo_V50/field field name=colorblack/field /doc doc field name=skuAudi A5/field field name=brandaudi/field field name=variant_idA5_white/field field name=colorwhite/field /doc doc field name=skuAudi S8/field field name=brandaudi/field field name=variant_idS8_yellow/field field name=coloryellow/field /doc doc field name=skuAudi S8/field field name=brandaudi/field field name=variant_idS8_black/field field name=colorblack/field field name=colorwhite/field /doc My goal is to to get this facet: brand - audi (3) - since there are 3 audi models (A4,A5 and S8) volvo (1) - since there is only one volvo model (V50) color - black (3) - since all models except except A5 is available in black white (3) - since A4,A5 and S8 is available in white yellow (1) - since only S8 is available in yellow And these 4 results (when query is *:*) - Audi A4 - Audi A5 - Audi S8 - Volvo V50 Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3843596.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
Ok, assuming sku is an un-tokenized field (and if it isn't, use a copyField) then just facet on that field. Then, at the app layer, combine them to get your aggregate counts. So your raw return would have Audi A4 (2) Audi A5 (1) Audi S8 (2) Volvo V50 (1) The app would have to be smart enough to spin through the sku facet and just know that the three Audi SKUs need to be rolled up into one Audi entry. This could be simple if the rule were that the SKU always started with the brand name And similarly for the other SKUs. Crude, but it'd work. Best Erick On Tue, Mar 20, 2012 at 4:01 PM, rasser r...@vertica.dk wrote: Thanks for taking the time to help me Erick! Just to clarify my desired behavior from the facets. This is the index, notice color is multivalued to represent a model of car that has more than one color: doc field name=skuAudi A4/field field name=brandaudi/field field name=variant_idA4_black/field field name=colorblack/field field name=colorwhite/field /doc doc field name=skuAudi A4/field field name=brandaudi/field field name=variant_idA4_white/field field name=colorwhite/field /doc doc field name=skuVolvo V50/field field name=brandvolvo/field field name=variant_idVolvo_V50/field field name=colorblack/field /doc doc field name=skuAudi A5/field field name=brandaudi/field field name=variant_idA5_white/field field name=colorwhite/field /doc doc field name=skuAudi S8/field field name=brandaudi/field field name=variant_idS8_yellow/field field name=coloryellow/field /doc doc field name=skuAudi S8/field field name=brandaudi/field field name=variant_idS8_black/field field name=colorblack/field field name=colorwhite/field /doc My goal is to to get this facet: brand - audi (3) - since there are 3 audi models (A4,A5 and S8) volvo (1) - since there is only one volvo model (V50) color - black (3) - since all models except except A5 is available in black white (3) - since A4,A5 and S8 is available in white yellow (1) - since only S8 is available in yellow And these 4 results (when query is *:*) - Audi A4 - Audi A5 - Audi S8 - Volvo V50 Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3843596.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
Groups and faceting are orthogonal and really have nothing to do with each other, so that might be where part of the problem lies. In your example, you can consider grouping by brand and count the *groups* returned, not elements within those groups. Then you're simply counting up the groups returned in the response packet. Note that this is NOT the stuff down in the facets section. You can still facet by color just as you are. Another possibility is to look at pivot faceting: https://issues.apache.org/jira/browse/SOLR-792 but I confess I haven't explored this so don't really understand if it applies to your problem. Best Erick On Mon, Mar 19, 2012 at 5:22 AM, Rasmus Østergård r...@vertica.dk wrote: I have an index that contains variants of cars. In this small sample I have 2 car models (Audi and Volvo) and the Audi is available in black or white, whereas the Volvo is only available in black. On the search page I want to display products not variants - in this test case 2 products should be shown: Audi A4 and Volvo V50 I'm having trouble achieving the desired count in my search facets. This is my test schema: fields field name= variant_id type=string indexed=true stored=true required=true / field name=sku type=string indexed=true stored=true / field name=color type=string indexed=true stored=true/ /fields uniqueKeyvariant_id/uniqueKey Test data: doc field name=skuAudi A4/field field name=brandaudi/field !-- Variant properties -- field name=variant_idA4_black/field field name=colorblack/field /doc doc field name=skuAudi A4/field field name=brandaudi/field !-- Variant properties -- field name=variant_idA4_white/field field name=colorwhite/field /doc doc field name=skuVolvo V50/field field name=brandvolvo/field !-- Variant properties -- field name=variant_idVolvo_V50/field field name=colorblack/field /doc My goal is to to get this facet: brand - audi (1) volvo (1) color - black (2) white (1) I'm trying to use group.truncate to do this but fails. This is my search query when not truncating: /select?facet.field=colorfacet.field=branddefType=edixmaxfacet=truegroup=truegroup.field=skugroup.truncate=false brand - audi (2) volvo (1) color - black (2) white (1) This is my search query when doing truncating: /select?facet.field=colorfacet.field=branddefType=edixmaxfacet=truegroup=truegroup.field=skugroup.truncate=true brand - audi (1) volvo (1) color - black (2) white (0) As can be seen none of the 2 above match my desire. The problem seems to be that I want trucating on only selected facets. I this posible? Thanks!
Re: To truncate or not to truncate (group.truncate vs. facet)
Hi Rasmus, You might want to use the group.facet parameter: http://wiki.apache.org/solr/FieldCollapsing#Request_Parameters I think that will give you the right facet counts with faceting. The parameter is not available in Solr 3.x, so you'll need to use a 4.0 nightly build. Martijn On 19 March 2012 13:39, Erick Erickson erickerick...@gmail.com wrote: Groups and faceting are orthogonal and really have nothing to do with each other, so that might be where part of the problem lies. In your example, you can consider grouping by brand and count the *groups* returned, not elements within those groups. Then you're simply counting up the groups returned in the response packet. Note that this is NOT the stuff down in the facets section. You can still facet by color just as you are. Another possibility is to look at pivot faceting: https://issues.apache.org/jira/browse/SOLR-792 but I confess I haven't explored this so don't really understand if it applies to your problem. Best Erick On Mon, Mar 19, 2012 at 5:22 AM, Rasmus Østergård r...@vertica.dk wrote: I have an index that contains variants of cars. In this small sample I have 2 car models (Audi and Volvo) and the Audi is available in black or white, whereas the Volvo is only available in black. On the search page I want to display products not variants - in this test case 2 products should be shown: Audi A4 and Volvo V50 I'm having trouble achieving the desired count in my search facets. This is my test schema: fields field name= variant_id type=string indexed=true stored=true required=true / field name=sku type=string indexed=true stored=true / field name=color type=string indexed=true stored=true/ /fields uniqueKeyvariant_id/uniqueKey Test data: doc field name=skuAudi A4/field field name=brandaudi/field !-- Variant properties -- field name=variant_idA4_black/field field name=colorblack/field /doc doc field name=skuAudi A4/field field name=brandaudi/field !-- Variant properties -- field name=variant_idA4_white/field field name=colorwhite/field /doc doc field name=skuVolvo V50/field field name=brandvolvo/field !-- Variant properties -- field name=variant_idVolvo_V50/field field name=colorblack/field /doc My goal is to to get this facet: brand - audi (1) volvo (1) color - black (2) white (1) I'm trying to use group.truncate to do this but fails. This is my search query when not truncating: /select?facet.field=colorfacet.field=branddefType=edixmaxfacet=truegroup=truegroup.field=skugroup.truncate=false brand - audi (2) volvo (1) color - black (2) white (1) This is my search query when doing truncating: /select?facet.field=colorfacet.field=branddefType=edixmaxfacet=truegroup=truegroup.field=skugroup.truncate=true brand - audi (1) volvo (1) color - black (2) white (0) As can be seen none of the 2 above match my desire. The problem seems to be that I want trucating on only selected facets. I this posible? Thanks! -- Met vriendelijke groet, Martijn van Groningen
Re: To truncate or not to truncate (group.truncate vs. facet)
Thanks for your reply Erick, As far as I can see grouping on brand (group.field=brand) will only work if all rows are returned. Correct? - if this is so it will not fly since only the top results are returned (rows=100) Or am I missing something. Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3840350.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
Thanks for the suggestion Martijn. I did see that v. 4 had a group.facet parameter that seems to fit my needs. But since I'm new to Solr I'm not really comfortable using version 4 in production, let alone a nightly build. Any other ideas? - I cant imagine that i'm the first person ever trying to combine faceting on both product and variant fields Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3840362.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
Well, it depends on how many groups we're talking here. Grouping returns the top N results _within_ each group. So if you have 10 brands and grouped on brand, you'd get back the top, say, 3 results for Ford, Volvo, Fiat, Saab, Audi.up to 10 groups. The number of groups you get back is governed by the rows parameter, and the number of docs in each group by group.limit So if you have a reasonable number of brands, this might work Best Erick On Mon, Mar 19, 2012 at 5:01 PM, rasser r...@vertica.dk wrote: Thanks for your reply Erick, As far as I can see grouping on brand (group.field=brand) will only work if all rows are returned. Correct? - if this is so it will not fly since only the top results are returned (rows=100) Or am I missing something. Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3840350.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: To truncate or not to truncate (group.truncate vs. facet)
I see your point. If I understand it correct it will however mean that i need to return 10(brands)x100(resultToShow) = 1000 docs to facilitate that all 100 results to show is of the same brand. Correnct? And tomorrow (or later) the customer will also want a facet on 5 new fields eg. production year. How could this be handled with the above approach? Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3840406.html Sent from the Solr - User mailing list archive at Nabble.com.