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 Raheel Hasan <ra...@gmail.com> on 2013/09/06 15:58:12 UTC

Facet Count and RegexTransformer>splitBy

Hi guyz,

Just a quick question:

I have a field that has CSV values in the database. So I will use the
DataImportHandler and will index it using RegexTransformer's splitBy
attribute. However, since this is the first time I am doing it, I just
wanted to be sure if it will work for Facet Count?

For example:
>From "query" results (say this is the values in that field):
row 1 = 1,2,3,4
row 2 = 1,4,5,3
row 3 = 2,1,20,66
.
.
.
.
so facet count will get me:
'1' = 3 occurrence
'2' = 2 occur.
.
.
.and so on.





-- 
Regards,
Raheel Hasan

Re: Facet Count and RegexTransformer>splitBy

Posted by Raheel Hasan <ra...@gmail.com>.
let me further elaborate:
[db>table1]
field1 = int
field2= string (solr indexing = true)
field3 = csv

[During import into solr]
splitBy=","

[After import]
solr will be searched for terms from field2.

[needed]
counts of occurrances of each value in csv



On Fri, Sep 6, 2013 at 9:35 PM, Raheel Hasan <ra...@gmail.com>wrote:

> Its a csv from the database. I will import it like this, (say for example
> the field is 'emailids' and it contain csv of email ids):
> <field column="mailId" splitBy="," sourceColName="emailids"/>
>
>
>
> On Fri, Sep 6, 2013 at 9:01 PM, Jack Krupansky <ja...@basetechnology.com>wrote:
>
>> You're not being clear here - are the commas delimiting fields or do you
>> have one value per row?
>>
>> Yes, you can tokenize a comma-delimited value in Solr.
>>
>>
>> -- Jack Krupansky
>>
>> -----Original Message----- From: Raheel Hasan
>> Sent: Friday, September 06, 2013 11:54 AM
>> To: solr-user@lucene.apache.org
>> Subject: Re: Facet Count and RegexTransformer>splitBy
>>
>>
>> Hi,
>>
>> What I want is very simple:
>>
>> The "query" results:
>> row 1 = a,b,c,d
>> row 2 = a,f,r,e
>> row 3 = a,c,ff,e,b
>> ..
>>
>> facet count needed:
>> 'a' = 3 occurrence
>> 'b' = 2 occur.
>> 'c' = 2 occur.
>> .
>> .
>> .
>>
>>
>> I searched and found a solution here:
>> http://stackoverflow.com/**questions/9914483/solr-facet-**
>> multiple-words-with-comma-**separated-values<http://stackoverflow.com/questions/9914483/solr-facet-multiple-words-with-comma-separated-values>
>>
>> But I want to be sure if it will work.
>>
>>
>>
>> On Fri, Sep 6, 2013 at 8:20 PM, Jack Krupansky <ja...@basetechnology.com>*
>> *wrote:
>>
>>  Facet counts are per field - your counts are scattered across different
>>> fields.
>>>
>>> There are additional capabilities in the facet component, but first you
>>> should describe exactly what your requirements are.
>>>
>>> -- Jack Krupansky
>>> -----Original Message----- From: Raheel Hasan
>>> Sent: Friday, September 06, 2013 9:58 AM
>>> To: solr-user@lucene.apache.org
>>> Subject: Facet Count and RegexTransformer>splitBy
>>>
>>>
>>> Hi guyz,
>>>
>>> Just a quick question:
>>>
>>> I have a field that has CSV values in the database. So I will use the
>>> DataImportHandler and will index it using RegexTransformer's splitBy
>>> attribute. However, since this is the first time I am doing it, I just
>>> wanted to be sure if it will work for Facet Count?
>>>
>>> For example:
>>> From "query" results (say this is the values in that field):
>>> row 1 = 1,2,3,4
>>> row 2 = 1,4,5,3
>>> row 3 = 2,1,20,66
>>> .
>>> .
>>> .
>>> .
>>> so facet count will get me:
>>> '1' = 3 occurrence
>>> '2' = 2 occur.
>>> .
>>> .
>>> .and so on.
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Raheel Hasan
>>>
>>>
>>
>>
>> --
>> Regards,
>> Raheel Hasan
>>
>
>
>
> --
> Regards,
> Raheel Hasan
>



-- 
Regards,
Raheel Hasan

Re: Facet Count and RegexTransformer>splitBy

Posted by Raheel Hasan <ra...@gmail.com>.
Its a csv from the database. I will import it like this, (say for example
the field is 'emailids' and it contain csv of email ids):
<field column="mailId" splitBy="," sourceColName="emailids"/>



On Fri, Sep 6, 2013 at 9:01 PM, Jack Krupansky <ja...@basetechnology.com>wrote:

> You're not being clear here - are the commas delimiting fields or do you
> have one value per row?
>
> Yes, you can tokenize a comma-delimited value in Solr.
>
>
> -- Jack Krupansky
>
> -----Original Message----- From: Raheel Hasan
> Sent: Friday, September 06, 2013 11:54 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Facet Count and RegexTransformer>splitBy
>
>
> Hi,
>
> What I want is very simple:
>
> The "query" results:
> row 1 = a,b,c,d
> row 2 = a,f,r,e
> row 3 = a,c,ff,e,b
> ..
>
> facet count needed:
> 'a' = 3 occurrence
> 'b' = 2 occur.
> 'c' = 2 occur.
> .
> .
> .
>
>
> I searched and found a solution here:
> http://stackoverflow.com/**questions/9914483/solr-facet-**
> multiple-words-with-comma-**separated-values<http://stackoverflow.com/questions/9914483/solr-facet-multiple-words-with-comma-separated-values>
>
> But I want to be sure if it will work.
>
>
>
> On Fri, Sep 6, 2013 at 8:20 PM, Jack Krupansky <ja...@basetechnology.com>**
> wrote:
>
>  Facet counts are per field - your counts are scattered across different
>> fields.
>>
>> There are additional capabilities in the facet component, but first you
>> should describe exactly what your requirements are.
>>
>> -- Jack Krupansky
>> -----Original Message----- From: Raheel Hasan
>> Sent: Friday, September 06, 2013 9:58 AM
>> To: solr-user@lucene.apache.org
>> Subject: Facet Count and RegexTransformer>splitBy
>>
>>
>> Hi guyz,
>>
>> Just a quick question:
>>
>> I have a field that has CSV values in the database. So I will use the
>> DataImportHandler and will index it using RegexTransformer's splitBy
>> attribute. However, since this is the first time I am doing it, I just
>> wanted to be sure if it will work for Facet Count?
>>
>> For example:
>> From "query" results (say this is the values in that field):
>> row 1 = 1,2,3,4
>> row 2 = 1,4,5,3
>> row 3 = 2,1,20,66
>> .
>> .
>> .
>> .
>> so facet count will get me:
>> '1' = 3 occurrence
>> '2' = 2 occur.
>> .
>> .
>> .and so on.
>>
>>
>>
>>
>>
>> --
>> Regards,
>> Raheel Hasan
>>
>>
>
>
> --
> Regards,
> Raheel Hasan
>



-- 
Regards,
Raheel Hasan

Re: Facet Count and RegexTransformer>splitBy

Posted by Jack Krupansky <ja...@basetechnology.com>.
You're not being clear here - are the commas delimiting fields or do you 
have one value per row?

Yes, you can tokenize a comma-delimited value in Solr.

-- Jack Krupansky

-----Original Message----- 
From: Raheel Hasan
Sent: Friday, September 06, 2013 11:54 AM
To: solr-user@lucene.apache.org
Subject: Re: Facet Count and RegexTransformer>splitBy

Hi,

What I want is very simple:

The "query" results:
row 1 = a,b,c,d
row 2 = a,f,r,e
row 3 = a,c,ff,e,b
..

facet count needed:
'a' = 3 occurrence
'b' = 2 occur.
'c' = 2 occur.
.
.
.


I searched and found a solution here:
http://stackoverflow.com/questions/9914483/solr-facet-multiple-words-with-comma-separated-values

But I want to be sure if it will work.



On Fri, Sep 6, 2013 at 8:20 PM, Jack Krupansky 
<ja...@basetechnology.com>wrote:

> Facet counts are per field - your counts are scattered across different
> fields.
>
> There are additional capabilities in the facet component, but first you
> should describe exactly what your requirements are.
>
> -- Jack Krupansky
> -----Original Message----- From: Raheel Hasan
> Sent: Friday, September 06, 2013 9:58 AM
> To: solr-user@lucene.apache.org
> Subject: Facet Count and RegexTransformer>splitBy
>
>
> Hi guyz,
>
> Just a quick question:
>
> I have a field that has CSV values in the database. So I will use the
> DataImportHandler and will index it using RegexTransformer's splitBy
> attribute. However, since this is the first time I am doing it, I just
> wanted to be sure if it will work for Facet Count?
>
> For example:
> From "query" results (say this is the values in that field):
> row 1 = 1,2,3,4
> row 2 = 1,4,5,3
> row 3 = 2,1,20,66
> .
> .
> .
> .
> so facet count will get me:
> '1' = 3 occurrence
> '2' = 2 occur.
> .
> .
> .and so on.
>
>
>
>
>
> --
> Regards,
> Raheel Hasan
>



-- 
Regards,
Raheel Hasan 


Re: Facet Count and RegexTransformer>splitBy

Posted by Raheel Hasan <ra...@gmail.com>.
basically, a field having a csv... and find counts / number of occurrance
of each csv value..


On Fri, Sep 6, 2013 at 8:54 PM, Raheel Hasan <ra...@gmail.com>wrote:

> Hi,
>
> What I want is very simple:
>
> The "query" results:
> row 1 = a,b,c,d
> row 2 = a,f,r,e
> row 3 = a,c,ff,e,b
> ..
>
> facet count needed:
> 'a' = 3 occurrence
> 'b' = 2 occur.
> 'c' = 2 occur.
> .
> .
> .
>
>
> I searched and found a solution here:
>
> http://stackoverflow.com/questions/9914483/solr-facet-multiple-words-with-comma-separated-values
>
> But I want to be sure if it will work.
>
>
>
> On Fri, Sep 6, 2013 at 8:20 PM, Jack Krupansky <ja...@basetechnology.com>wrote:
>
>> Facet counts are per field - your counts are scattered across different
>> fields.
>>
>> There are additional capabilities in the facet component, but first you
>> should describe exactly what your requirements are.
>>
>> -- Jack Krupansky
>> -----Original Message----- From: Raheel Hasan
>> Sent: Friday, September 06, 2013 9:58 AM
>> To: solr-user@lucene.apache.org
>> Subject: Facet Count and RegexTransformer>splitBy
>>
>>
>> Hi guyz,
>>
>> Just a quick question:
>>
>> I have a field that has CSV values in the database. So I will use the
>> DataImportHandler and will index it using RegexTransformer's splitBy
>> attribute. However, since this is the first time I am doing it, I just
>> wanted to be sure if it will work for Facet Count?
>>
>> For example:
>> From "query" results (say this is the values in that field):
>> row 1 = 1,2,3,4
>> row 2 = 1,4,5,3
>> row 3 = 2,1,20,66
>> .
>> .
>> .
>> .
>> so facet count will get me:
>> '1' = 3 occurrence
>> '2' = 2 occur.
>> .
>> .
>> .and so on.
>>
>>
>>
>>
>>
>> --
>> Regards,
>> Raheel Hasan
>>
>
>
>
> --
> Regards,
> Raheel Hasan
>



-- 
Regards,
Raheel Hasan

Re: Facet Count and RegexTransformer>splitBy

Posted by Raheel Hasan <ra...@gmail.com>.
Hi,

What I want is very simple:

The "query" results:
row 1 = a,b,c,d
row 2 = a,f,r,e
row 3 = a,c,ff,e,b
..

facet count needed:
'a' = 3 occurrence
'b' = 2 occur.
'c' = 2 occur.
.
.
.


I searched and found a solution here:
http://stackoverflow.com/questions/9914483/solr-facet-multiple-words-with-comma-separated-values

But I want to be sure if it will work.



On Fri, Sep 6, 2013 at 8:20 PM, Jack Krupansky <ja...@basetechnology.com>wrote:

> Facet counts are per field - your counts are scattered across different
> fields.
>
> There are additional capabilities in the facet component, but first you
> should describe exactly what your requirements are.
>
> -- Jack Krupansky
> -----Original Message----- From: Raheel Hasan
> Sent: Friday, September 06, 2013 9:58 AM
> To: solr-user@lucene.apache.org
> Subject: Facet Count and RegexTransformer>splitBy
>
>
> Hi guyz,
>
> Just a quick question:
>
> I have a field that has CSV values in the database. So I will use the
> DataImportHandler and will index it using RegexTransformer's splitBy
> attribute. However, since this is the first time I am doing it, I just
> wanted to be sure if it will work for Facet Count?
>
> For example:
> From "query" results (say this is the values in that field):
> row 1 = 1,2,3,4
> row 2 = 1,4,5,3
> row 3 = 2,1,20,66
> .
> .
> .
> .
> so facet count will get me:
> '1' = 3 occurrence
> '2' = 2 occur.
> .
> .
> .and so on.
>
>
>
>
>
> --
> Regards,
> Raheel Hasan
>



-- 
Regards,
Raheel Hasan

Re: Facet Count and RegexTransformer>splitBy

Posted by Jack Krupansky <ja...@basetechnology.com>.
Facet counts are per field - your counts are scattered across different 
fields.

There are additional capabilities in the facet component, but first you 
should describe exactly what your requirements are.

-- Jack Krupansky
-----Original Message----- 
From: Raheel Hasan
Sent: Friday, September 06, 2013 9:58 AM
To: solr-user@lucene.apache.org
Subject: Facet Count and RegexTransformer>splitBy

Hi guyz,

Just a quick question:

I have a field that has CSV values in the database. So I will use the
DataImportHandler and will index it using RegexTransformer's splitBy
attribute. However, since this is the first time I am doing it, I just
wanted to be sure if it will work for Facet Count?

For example:
>From "query" results (say this is the values in that field):
row 1 = 1,2,3,4
row 2 = 1,4,5,3
row 3 = 2,1,20,66
.
.
.
.
so facet count will get me:
'1' = 3 occurrence
'2' = 2 occur.
.
.
.and so on.





-- 
Regards,
Raheel Hasan