Quantcast

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

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

rasser
This post was updated on .
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"/>
   <field name="brand" type="string" indexed="true" stored="true"/>
 </fields>
<uniqueKey>variant_id</uniqueKey>

Test data:

<doc>
<field name="sku">Audi A4</field>
<field name="brand">audi</field>

<field name="variant_id">A4_black</field>
<field name="color">black</field>
</doc>
<doc>
<field name="sku">Audi A4</field>
<field name="brand">audi</field>

<field name="variant_id">A4_white</field>
<field name="color">white</field>
</doc>
<doc>
<field name="sku">Volvo V50</field>
<field name="brand">volvo</field>

<field name="variant_id">Volvo_V50</field>
<field name="color">black</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=color&facet.field=brand&defType=edixmax&facet=true&group=true&group.field=sku&group.truncate=false

brand
-------------
audi (2)
volvo (1)

color
-------------
black (2)
white (1)


This is my search query when doing truncating:
/select?facet.field=color&facet.field=brand&defType=edixmax&facet=true&group=true&group.field=sku&group.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!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Erick Erickson
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 <[hidden email]> 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>
> <uniqueKey>variant_id</uniqueKey>
>
> Test data:
>
> <doc>
> <field name="sku">Audi A4</field>
> <field name="brand">audi</field>
> <!-- Variant properties -->
> <field name="variant_id">A4_black</field>
> <field name="color">black</field>
> </doc>
> <doc>
> <field name="sku">Audi A4</field>
> <field name="brand">audi</field>
> <!-- Variant properties -->
> <field name="variant_id">A4_white</field>
> <field name="color">white</field>
> </doc>
> <doc>
> <field name="sku">Volvo V50</field>
> <field name="brand">volvo</field>
> <!-- Variant properties -->
> <field name="variant_id">Volvo_V50</field>
> <field name="color">black</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=color&facet.field=brand&defType=edixmax&facet=true&group=true&group.field=sku&group.truncate=false
>
> brand
> -------------
> audi (2)
> volvo (1)
>
> color
> -------------
> black (2)
> white (1)
>
>
> This is my search query when doing truncating:
> /select?facet.field=color&facet.field=brand&defType=edixmax&facet=true&group=true&group.field=sku&group.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!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Martijn v Groningen-2
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 <[hidden email]> 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 <[hidden email]> 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>
> > <uniqueKey>variant_id</uniqueKey>
> >
> > Test data:
> >
> > <doc>
> > <field name="sku">Audi A4</field>
> > <field name="brand">audi</field>
> > <!-- Variant properties -->
> > <field name="variant_id">A4_black</field>
> > <field name="color">black</field>
> > </doc>
> > <doc>
> > <field name="sku">Audi A4</field>
> > <field name="brand">audi</field>
> > <!-- Variant properties -->
> > <field name="variant_id">A4_white</field>
> > <field name="color">white</field>
> > </doc>
> > <doc>
> > <field name="sku">Volvo V50</field>
> > <field name="brand">volvo</field>
> > <!-- Variant properties -->
> > <field name="variant_id">Volvo_V50</field>
> > <field name="color">black</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=color&facet.field=brand&defType=edixmax&facet=true&group=true&group.field=sku&group.truncate=false
> >
> > brand
> > -------------
> > audi (2)
> > volvo (1)
> >
> > color
> > -------------
> > black (2)
> > white (1)
> >
> >
> > This is my search query when doing truncating:
> >
> /select?facet.field=color&facet.field=brand&defType=edixmax&facet=true&group=true&group.field=sku&group.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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

rasser
In reply to this post by Erick Erickson
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

rasser
In reply to this post by Martijn v Groningen-2
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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Erick Erickson
In reply to this post by rasser
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 <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

rasser
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Erick Erickson
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 <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

rasser
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="sku">Audi A4</field>
<field name="brand">audi</field>
<field name="variant_id">A4_black</field>
<field name="color">black</field>
<field name="color">white</field>
</doc>
<doc>
<field name="sku">Audi A4</field>
<field name="brand">audi</field>
<field name="variant_id">A4_white</field>
<field name="color">white</field>
</doc>
<doc>
<field name="sku">Volvo V50</field>
<field name="brand">volvo</field>
<field name="variant_id">Volvo_V50</field>
<field name="color">black</field>
</doc>
<doc>
<field name="sku">Audi A5</field>
<field name="brand">audi</field>
<field name="variant_id">A5_white</field>
<field name="color">white</field>
</doc>
<doc>
<field name="sku">Audi S8</field>
<field name="brand">audi</field>
<field name="variant_id">S8_yellow</field>
<field name="color">yellow</field>
</doc>
<doc>
<field name="sku">Audi S8</field>
<field name="brand">audi</field>
<field name="variant_id">S8_black</field>
<field name="color">black</field>
<field name="color">white</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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Erick Erickson
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 <[hidden email]> 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="sku">Audi A4</field>
> <field name="brand">audi</field>
> <field name="variant_id">A4_black</field>
> <field name="color">black</field>
> <field name="color">white</field>
> </doc>
> <doc>
> <field name="sku">Audi A4</field>
> <field name="brand">audi</field>
> <field name="variant_id">A4_white</field>
> <field name="color">white</field>
> </doc>
> <doc>
> <field name="sku">Volvo V50</field>
> <field name="brand">volvo</field>
> <field name="variant_id">Volvo_V50</field>
> <field name="color">black</field>
> </doc>
> <doc>
> <field name="sku">Audi A5</field>
> <field name="brand">audi</field>
> <field name="variant_id">A5_white</field>
> <field name="color">white</field>
> </doc>
> <doc>
> <field name="sku">Audi S8</field>
> <field name="brand">audi</field>
> <field name="variant_id">S8_yellow</field>
> <field name="color">yellow</field>
> </doc>
> <doc>
> <field name="sku">Audi S8</field>
> <field name="brand">audi</field>
> <field name="variant_id">S8_black</field>
> <field name="color">black</field>
> <field name="color">white</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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

danjfoley
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?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Young, Cody
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]]
Sent: Saturday, April 07, 2012 7:02 PM
To: [hidden email]
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

danjfoley
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]>
Date: Mon, Apr 9, 2012 12:45 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <[hidden email]>



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]]
Sent: Saturday, April 07, 2012 7:02 PM
To: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Young, Cody
You tried adding the parameter

&group.facet=true ?

Cody

-----Original Message-----
From: danjfoley [mailto:[hidden email]]
Sent: Monday, April 09, 2012 10:09 AM
To: [hidden email]
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]>
Date: Mon, Apr 9, 2012 12:45 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <[hidden email]>



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]]
Sent: Saturday, April 07, 2012 7:02 PM
To: [hidden email]
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
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Young, Cody
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]]
Sent: Monday, April 09, 2012 10:36 AM
To: [hidden email]
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]]
Sent: Monday, April 09, 2012 10:09 AM
To: [hidden email]
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]>
Date: Mon, Apr 9, 2012 12:45 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <[hidden email]>



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]]
Sent: Saturday, April 07, 2012 7:02 PM
To: [hidden email]
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
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

danjfoley
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]>
Date: Mon, Apr 9, 2012 1:38 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <[hidden email]>



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]]
Sent: Monday, April 09, 2012 10:36 AM
To: [hidden email]
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]]
Sent: Monday, April 09, 2012 10:09 AM
To: [hidden email]
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]>
Date: Mon, Apr 9, 2012 12:45 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <[hidden email]>



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]]
Sent: Saturday, April 07, 2012 7:02 PM
To: [hidden email]
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 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Martijn v Groningen-2
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]> 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]
> >
> Date: Mon, Apr 9, 2012 1:38 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <[hidden email]>
>
>
>
> 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]]
> Sent: Monday, April 09, 2012 10:36 AM
> To: [hidden email]
> 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]]
> Sent: Monday, April 09, 2012 10:09 AM
> To: [hidden email]
> 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]
> >
> Date: Mon, Apr 9, 2012 12:45 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <[hidden email]>
>
>
>
> 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]]
> Sent: Saturday, April 07, 2012 7:02 PM
> To: [hidden email]
> 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
>
> --
> 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
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

danjfoley
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]>
Date: Mon, Apr 9, 2012 3:31 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <[hidden email]>



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]> 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]
> >
> Date: Mon, Apr 9, 2012 1:38 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <[hidden email]>
>
>
>
> 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]]
> Sent: Monday, April 09, 2012 10:36 AM
> To: [hidden email]
> 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]]
> Sent: Monday, April 09, 2012 10:09 AM
> To: [hidden email]
> 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]
> >
> Date: Mon, Apr 9, 2012 12:45 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <[hidden email]>
>
>
>
> 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]]
> Sent: Saturday, April 07, 2012 7:02 PM
> To: [hidden email]
> 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
> --
> 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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Young, Cody
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]]
Sent: Monday, April 09, 2012 7:26 PM
To: [hidden email]
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]>
Date: Mon, Apr 9, 2012 3:31 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <[hidden email]>



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]> 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]
> >
> Date: Mon, Apr 9, 2012 1:38 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <[hidden email]>
>
>
>
> 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]]
> Sent: Monday, April 09, 2012 10:36 AM
> To: [hidden email]
> 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]]
> Sent: Monday, April 09, 2012 10:09 AM
> To: [hidden email]
> 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]
> >
> Date: Mon, Apr 9, 2012 12:45 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <[hidden email]>
>
>
>
> 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]]
> Sent: Saturday, April 07, 2012 7:02 PM
> To: [hidden email]
> 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

danjfoley
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] <[hidden email]> 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]]
Sent: Monday, April 09, 2012 7:26 PM
To: [hidden email]
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]>
Date: Mon, Apr 9, 2012 3:31 pm
Subject: To truncate or not to truncate (group.truncate vs. facet)
To: "danjfoley" <[hidden email]>



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]> 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]
> >
> Date: Mon, Apr 9, 2012 1:38 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <[hidden email]>
>
>
>
> 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]]
> Sent: Monday, April 09, 2012 10:36 AM
> To: [hidden email]
> 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]]
> Sent: Monday, April 09, 2012 10:09 AM
> To: [hidden email]
> 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]
> >
> Date: Mon, Apr 9, 2012 12:45 pm
> Subject: To truncate or not to truncate (group.truncate vs. facet)
> To: "danjfoley" <[hidden email]>
>

>
>
> 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]]
> Sent: Saturday, April 07, 2012 7:02 PM
> To: [hidden email]

> 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.
NAML



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

Loading...