You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by danjfoley <da...@micamedia.com> on 2012/04/08 04:02:00 UTC

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)

Posted by danjfoley <da...@micamedia.com>.
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+s472066n3900432h41@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=node&node=3900432&i=0>]
>
> Sent: Monday, April 09, 2012 7:26 PM
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=3900432&i=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=node&node=3900432&i=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=node&node=3900432&i=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=node&node=3900432&i=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=node&node=3900432&i=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=node&node=3900432&i=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=node&node=3900432&i=7>]
>
> > Sent: Monday, April 09, 2012 10:36 AM
> > To: [hidden email]<http://user/SendEmail.jtp?type=node&node=3900432&i=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=node&node=3900432&i=9>]
>
> > Sent: Monday, April 09, 2012 10:09 AM
> > To: [hidden email]<http://user/SendEmail.jtp?type=node&node=3900432&i=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=node&node=3900432&i=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=node&node=3900432&i=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=node&node=3900432&i=13>]
>
> > Sent: Saturday, April 07, 2012 7:02 PM
> > To: [hidden email]<http://user/SendEmail.jtp?type=node&node=3900432&i=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 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=unsu
> > bscribe_by_code&node=3838797&code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wt
> > MTEyNjQzODIyNg==
> >
> > --
> > View this message in context:
> > http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-grou
> > p-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-grou
> > p-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=unsu
> > bscribe_by_c
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3898537.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-tp3838797p3900432.html
>  To unsubscribe from To truncate or not to truncate (group.truncate vs.
> facet), click here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3838797&code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wtMTEyNjQzODIyNg==>
> .
> NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Dan Foley
Owner - PHP Web Developer
_______________________________________________________
Micamedia.com - PHP Web Development


--
View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3900517.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: To truncate or not to truncate (group.truncate vs. facet)

Posted by "Young, Cody" <Co...@move.com>.
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:dan@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...@n3.nabble.com>
Date: Mon, Apr 9, 2012 3:31 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <da...@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 <da...@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+s472066n3897487h46@n3.nabble.com
> >
> Date: Mon, Apr 9, 2012 1:38 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <da...@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.Young@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:dan@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+s472066n3897366h95@n3.nabble.com
> >
> Date: Mon, Apr 9, 2012 12:45 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <da...@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:dan@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=unsu
> bscribe_by_code&node=3838797&code=ZGFuQG1pY2FtZWRpYS5jb218MzgzODc5N3wt
> MTEyNjQzODIyNg==
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-grou
> p-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-grou
> p-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=unsu
> bscribe_by_c

--
View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3898537.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: To truncate or not to truncate (group.truncate vs. facet)

Posted by danjfoley <da...@micamedia.com>.
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...@n3.nabble.com>
Date: Mon, Apr 9, 2012 3:31 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <da...@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 <da...@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+s472066n3897487h46@n3.nabble.com
> >
> Date: Mon, Apr 9, 2012 1:38 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <da...@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.Young@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:dan@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+s472066n3897366h95@n3.nabble.com
> >
> Date: Mon, Apr 9, 2012 12:45 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <da...@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:dan@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_code&node=3838797&code=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_c

--
View this message in context: http://lucene.472066.n3.nabble.com/To-truncate-or-not-to-truncate-group-truncate-vs-facet-tp3838797p3898537.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: To truncate or not to truncate (group.truncate vs. facet)

Posted by Martijn v Groningen <ma...@gmail.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 <da...@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+s472066n3897487h46@n3.nabble.com
> >
> Date: Mon, Apr 9, 2012 1:38 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <da...@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.Young@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:dan@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+s472066n3897366h95@n3.nabble.com
> >
> Date: Mon, Apr 9, 2012 12:45 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <da...@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:dan@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_code&node=3838797&code=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_code&node=3838797&code=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.
>



-- 
Met vriendelijke groet,

Martijn van Groningen

Re: To truncate or not to truncate (group.truncate vs. facet)

Posted by danjfoley <da...@micamedia.com>.
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...@n3.nabble.com>
Date: Mon, Apr 9, 2012 1:38 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <da...@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.Young@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:dan@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...@n3.nabble.com>
Date: Mon, Apr 9, 2012 12:45 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <da...@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:dan@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_code&node=3838797&code=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_code&node=3838797&code=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)

Posted by "Young, Cody" <Co...@move.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.Young@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:dan@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...@n3.nabble.com>
Date: Mon, Apr 9, 2012 12:45 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <da...@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:dan@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_code&node=3838797&code=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)

Posted by "Young, Cody" <Co...@move.com>.
You tried adding the parameter

&group.facet=true ?

Cody

-----Original Message-----
From: danjfoley [mailto:dan@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...@n3.nabble.com>
Date: Mon, Apr 9, 2012 12:45 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <da...@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:dan@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_code&node=3838797&code=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)

Posted by danjfoley <da...@micamedia.com>.
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...@n3.nabble.com>
Date: Mon, Apr 9, 2012 12:45 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <da...@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:dan@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_code&node=3838797&code=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)

Posted by "Young, Cody" <Co...@move.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:dan@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.