[jira] Commented: (SOLR-1814) select count(distinct fieldname) in SOLR

2010-03-12 Thread Marcus Herou (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12844437#action_12844437
 ] 

Marcus Herou commented on SOLR-1814:


Instead of having the file attached... 
http://svn.tailsweep.com/opensource/solr-contrib/trunk/src/main/java/org/apache/solr/handler/component/

Erik:
The facet counts is something else, it groups the counts based on the field 
supplied does it not? Perhaps facet.query (like you pointed out) can be used, I 
overlooked that. Never got an answer on the mailinglist so I implemented it 
instead :)

What I jave accomplished is this:

select count(distinct blog) from BlogEntries where ...somexpression...

One doc is in in this case a BlogEntry and each belongs to Blog (many-to-one). 
If this already can be accomplished in SOLR, my bad. Please tell me how.

Ted: 
Trove have two licenses GPL and ASL. I can use the ASL version if it helps. I 
only use Trove due to the efficiency, plain hashmaps can be used of course if 
it is a showstopper.



 select count(distinct fieldname) in SOLR
 

 Key: SOLR-1814
 URL: https://issues.apache.org/jira/browse/SOLR-1814
 Project: Solr
  Issue Type: New Feature
  Components: SearchComponents - other
Affects Versions: 1.4, 1.5, 1.6, 2.0
Reporter: Marcus Herou
 Fix For: 1.4, 1.5, 1.6, 2.0

 Attachments: CountComponent.java


 I have seen questions on the mailinglist about having the functionality for 
 counting distinct on a field. We at Tailsweep as well want to that in for 
 example our blogsearch.
 Example:
 You had 1345 hits on 244 blogs
 The 244 part is not possible in SOLR today (correct me if I am wrong). So 
 I've written a component which does this. Attaching it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1814) select count(distinct fieldname) in SOLR

2010-03-12 Thread Marcus Herou (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1286#action_1286
 ] 

Marcus Herou commented on SOLR-1814:


Ted: I am an idiot about ASL. GNU Trove ( I mixed it up with something else ).

I can add code which uses Trove if available in the CP or plain Hashmaps if 
not. Think it exists some good collection utils in commons. Will look it up. 
Trove however is super.

 select count(distinct fieldname) in SOLR
 

 Key: SOLR-1814
 URL: https://issues.apache.org/jira/browse/SOLR-1814
 Project: Solr
  Issue Type: New Feature
  Components: SearchComponents - other
Affects Versions: 1.4, 1.5, 1.6, 2.0
Reporter: Marcus Herou
 Fix For: 1.4, 1.5, 1.6, 2.0

 Attachments: CountComponent.java


 I have seen questions on the mailinglist about having the functionality for 
 counting distinct on a field. We at Tailsweep as well want to that in for 
 example our blogsearch.
 Example:
 You had 1345 hits on 244 blogs
 The 244 part is not possible in SOLR today (correct me if I am wrong). So 
 I've written a component which does this. Attaching it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1814) select count(distinct fieldname) in SOLR

2010-03-10 Thread Erik Hatcher (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12843574#action_12843574
 ] 

Erik Hatcher commented on SOLR-1814:


I'm a bit confused here, but maybe don't quite understand what you've 
implemented.  Doesn't faceting give you the counts you're after here?   I'm 
assuming blogs in your example is a value of a type field or something like 
that.  Faceting on the type field would give you that count, or doing a 
facet.query=type:blogs would give you just that count (for any arbitrary query).



 select count(distinct fieldname) in SOLR
 

 Key: SOLR-1814
 URL: https://issues.apache.org/jira/browse/SOLR-1814
 Project: Solr
  Issue Type: New Feature
  Components: SearchComponents - other
Affects Versions: 1.4, 1.5, 1.6, 2.0
Reporter: Marcus Herou
 Fix For: 1.4, 1.5, 1.6, 2.0

 Attachments: CountComponent.java


 I have seen questions on the mailinglist about having the functionality for 
 counting distinct on a field. We at Tailsweep as well want to that in for 
 example our blogsearch.
 Example:
 You had 1345 hits on 244 blogs
 The 244 part is not possible in SOLR today (correct me if I am wrong). So 
 I've written a component which does this. Attaching it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1814) select count(distinct fieldname) in SOLR

2010-03-10 Thread Ted Dunning (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12843632#action_12843632
 ] 

Ted Dunning commented on SOLR-1814:
---


Trove is GPL.

The Mahout project has a partial set of replacements for Trove collections in 
case you want to go forward with this.  Our plan is to consider breaking out 
the collections package from Mahout at some point in case you don't want to 
drag along the rest of Mahout.


 select count(distinct fieldname) in SOLR
 

 Key: SOLR-1814
 URL: https://issues.apache.org/jira/browse/SOLR-1814
 Project: Solr
  Issue Type: New Feature
  Components: SearchComponents - other
Affects Versions: 1.4, 1.5, 1.6, 2.0
Reporter: Marcus Herou
 Fix For: 1.4, 1.5, 1.6, 2.0

 Attachments: CountComponent.java


 I have seen questions on the mailinglist about having the functionality for 
 counting distinct on a field. We at Tailsweep as well want to that in for 
 example our blogsearch.
 Example:
 You had 1345 hits on 244 blogs
 The 244 part is not possible in SOLR today (correct me if I am wrong). So 
 I've written a component which does this. Attaching it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.