You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Marcus Herou (JIRA)" <ji...@apache.org> on 2010/03/10 10:21:27 UTC

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

     [ https://issues.apache.org/jira/browse/SOLR-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcus Herou updated SOLR-1814:
-------------------------------

    Attachment: CountComponent.java

It has dependencies to GNU Trove tested against v 2.0.2
http://sourceforge.net/projects/trove4j/files/trove/archived/trove-2.0.2/trove-2.0.2.tar.gz/download

Trove have more memory efficient data structures so I used those instead. Perhaps should be broken out.

solrconfig.xml

<arr name="last-components">
  <str>count</str>	     
</arr>

<searchComponent name="count" class="org.apache.solr.handler.component.CountComponent" />



> 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
>            Reporter: Marcus Herou
>         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.