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 Ken Krugler <kk...@transpac.com> on 2013/09/12 02:24:06 UTC

Grouping by field substring?

Hi all,

Assuming I want to use the first N characters of a specific field for grouping results, is such a thing possible out-of-the-box?

If not, then what would the next best option be? E.g. a custom function query?

Thanks,

-- Ken

--------------------------
Ken Krugler
+1 530-210-6378
http://www.scaleunlimited.com
custom big data solutions & training
Hadoop, Cascading, Cassandra & Solr






Re: Grouping by field substring?

Posted by Ken Krugler <kk...@transpac.com>.
Hi Jack,

On Sep 11, 2013, at 5:34pm, Jack Krupansky wrote:

> Do a copyField to another field, with a limit of 8 characters, and then use that other field.

Thanks - I should have included a few more details in my original question.

The issue is that I've got an index with 200M records, of which about 50M have a unique value for this prefix (which is 32 characters long)

So adding another indexed field would be significant, which is why I was hoping there was a way to do it via grouping/collapsing at query time.

Or is that just not possible?

Thanks,

-- Ken

> -----Original Message----- From: Ken Krugler
> Sent: Wednesday, September 11, 2013 8:24 PM
> To: solr-user@lucene.apache.org
> Subject: Grouping by field substring?
> 
> Hi all,
> 
> Assuming I want to use the first N characters of a specific field for grouping results, is such a thing possible out-of-the-box?
> 
> If not, then what would the next best option be? E.g. a custom function query?
> 
> Thanks,
> 
> -- Ken
> 
> --------------------------
> Ken Krugler
> +1 530-210-6378
> http://www.scaleunlimited.com
> custom big data solutions & training
> Hadoop, Cascading, Cassandra & Solr
> 
> 
> 
> 
> 

--------------------------
Ken Krugler
+1 530-210-6378
http://www.scaleunlimited.com
custom big data solutions & training
Hadoop, Cascading, Cassandra & Solr






Re: Grouping by field substring?

Posted by Jack Krupansky <ja...@basetechnology.com>.
Do a copyField to another field, with a limit of 8 characters, and then use 
that other field.

-- Jack Krupansky

-----Original Message----- 
From: Ken Krugler
Sent: Wednesday, September 11, 2013 8:24 PM
To: solr-user@lucene.apache.org
Subject: Grouping by field substring?

Hi all,

Assuming I want to use the first N characters of a specific field for 
grouping results, is such a thing possible out-of-the-box?

If not, then what would the next best option be? E.g. a custom function 
query?

Thanks,

-- Ken

--------------------------
Ken Krugler
+1 530-210-6378
http://www.scaleunlimited.com
custom big data solutions & training
Hadoop, Cascading, Cassandra & Solr