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 Rémy Loubradou <re...@hipsnip.com> on 2011/09/28 15:25:46 UTC

FieldCollapsing don't return every groups

Hello,

I'm using the field collapsing feature to group my products by merchant and
I don't understand why some merchant are missing on the result send by solr.
My request is
http:/localhost:8983/solr/select/?q=merchant_name_t:*&version=2.2&start=0&rows=2000&indent=on&group=true&group.field=merchant_name_t&fl=merchant_name_t&wt=json.
Currently the request return 166 merchants and it should return more than
that.
Did I do something wrong in my query?

Thank you,
Remy

Re: FieldCollapsing don't return every groups

Posted by lboutros <bo...@gmail.com>.
I just checked, you can disable the storing parameter and use this field:

<dynamicField name="*_t_group"  type="string"    indexed="true" 
stored="false"/>

Ludovic.

-----
Jouve
France.
--
View this message in context: http://lucene.472066.n3.nabble.com/FieldCollapsing-don-t-return-every-groups-tp3376036p3376316.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: FieldCollapsing don't return every groups

Posted by lboutros <bo...@gmail.com>.
excellent !

and yes, il fait très beau en France :)

-----
Jouve
France.
--
View this message in context: http://lucene.472066.n3.nabble.com/FieldCollapsing-don-t-return-every-groups-tp3376036p3376362.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: FieldCollapsing don't return every groups

Posted by Rémy Loubradou <re...@hipsnip.com>.
You right one of the group is 'ltd". Thanks :)

I fixed this issue using a field that I know is unique for each merchant
(the merchant id).

Again thanks for your help Ludovic.

Sinon en France il fait beau? :)


On 28 September 2011 16:56, lboutros <bo...@gmail.com> wrote:

> Ok, thanks for the schema.
>
> the merchant "Cult Beauty Ltd" should be indexed like this:
>
> cult
> beauty
> ltd
>
> I think some other merchants contain at least one of these words.
>
> you should try to group with a special field used for field collapsing:
>
> <dynamicField name="*_t_group"  type="string"    indexed="true"
> stored="true"/>
>
> I think you could even disable the stored value for this particular field
> (not sure, I have to check).
>
> Ludovic.
>
> -----
> Jouve
> France.
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/FieldCollapsing-don-t-return-every-groups-tp3376036p3376289.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: FieldCollapsing don't return every groups

Posted by lboutros <bo...@gmail.com>.
Ok, thanks for the schema.

the merchant "Cult Beauty Ltd" should be indexed like this:

cult 
beauty 
ltd

I think some other merchants contain at least one of these words.

you should try to group with a special field used for field collapsing:

<dynamicField name="*_t_group"  type="string"    indexed="true" 
stored="true"/>

I think you could even disable the stored value for this particular field
(not sure, I have to check).

Ludovic.

-----
Jouve
France.
--
View this message in context: http://lucene.472066.n3.nabble.com/FieldCollapsing-don-t-return-every-groups-tp3376036p3376289.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: FieldCollapsing don't return every groups

Posted by Rémy Loubradou <re...@hipsnip.com>.
Hi Ludovic,

I'm not sure to understand which piece of my schema expose the analyzer so
you will find my schema here
https://github.com/lbdremy/solr-install/blob/master/conf/schema.xml. Hope
this will be helpfull :)
The merchant_name_t is a dynamic field matching the "*_t" pattern so this
field is indexed and the type is "text_general".

When I said "it should return more than that", I mean the result send by
solr contains 166 groups(=merchants) and it should return more than 166
groups(merchants).
For example the merchant "Cult Beauty Ltd." doesn't not appear in the result
and others merchants don't begin by "Cult", so where this merchant is
grouped?

Thank you very much for your help Ludovic.

Rémy,

On 28 September 2011 15:52, lboutros <bo...@gmail.com> wrote:

> Hi Remy,
>
> could you paste the analyzer part of the field merchant_name_t please ?
>
> And when you say "it should return more than that", could you explain why
> with examples ?
>
> If I'm not wrong, the field collapsing function is based on indexed values,
> so if your analyzer is complex (not "string"),
>
> "Rémy Loubradou" can be indexed as "remy" and "loubradou".
>
> And "Rémy NotLoubradou" could be grouped with "Rémy Loubradou".
>
> This could explain the behavior.
>
> Ludovic.
>
>
> -----
> Jouve
> France.
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/FieldCollapsing-don-t-return-every-groups-tp3376036p3376089.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: FieldCollapsing don't return every groups

Posted by lboutros <bo...@gmail.com>.
Hi Remy,

could you paste the analyzer part of the field merchant_name_t please ?

And when you say "it should return more than that", could you explain why
with examples ?

If I'm not wrong, the field collapsing function is based on indexed values, 
so if your analyzer is complex (not "string"),

"Rémy Loubradou" can be indexed as "remy" and "loubradou".

And "Rémy NotLoubradou" could be grouped with "Rémy Loubradou".

This could explain the behavior.

Ludovic.


-----
Jouve
France.
--
View this message in context: http://lucene.472066.n3.nabble.com/FieldCollapsing-don-t-return-every-groups-tp3376036p3376089.html
Sent from the Solr - User mailing list archive at Nabble.com.