Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3F334200D46 for ; Sun, 26 Nov 2017 16:29:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3DA73160BFA; Sun, 26 Nov 2017 15:29:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 82CFF160BE7 for ; Sun, 26 Nov 2017 16:29:04 +0100 (CET) Received: (qmail 72078 invoked by uid 500); 26 Nov 2017 15:29:02 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 72066 invoked by uid 99); 26 Nov 2017 15:29:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Nov 2017 15:29:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7936F180414 for ; Sun, 26 Nov 2017 15:29:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.541 X-Spam-Level: * X-Spam-Status: No, score=1.541 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_BRBL_LASTEXT=1.644, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=elyograg.org Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id yT83s8oT1RL6 for ; Sun, 26 Nov 2017 15:28:59 +0000 (UTC) Received: from frodo.elyograg.org (frodo.elyograg.org [166.70.79.219]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 935115F6C8 for ; Sun, 26 Nov 2017 15:28:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by frodo.elyograg.org (Postfix) with ESMTP id B6036821; Sun, 26 Nov 2017 08:28:48 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=elyograg.org; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:subject:subject:received :received; s=mail; t=1511710127; bh=LsDq8hEMABcZnxa5+e+gVaSY3Yx5 t/XW5v9iP40DgS8=; b=WBg7tVgVKYzQ9ilUMXKgU87p4ZKP9EiIBf9WeMbmFvJ+ L28TymUJSdXJvnLJnqBASr61BBTRE1dBbikPVIJDEzMZ+5GcwDV6R7alIE6kuR1A afFbuest/1roH9+mn5bQZ7ReSRyFR8TAjAnGZeBvLlYlvK1SgqPZCMh8y6HNzto= X-Virus-Scanned: Debian amavisd-new at frodo.elyograg.org Received: from frodo.elyograg.org ([127.0.0.1]) by localhost (frodo.elyograg.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 7-a6seUHlWSz; Sun, 26 Nov 2017 08:28:47 -0700 (MST) Received: from [192.168.1.111] (111.int.elyograg.org [192.168.1.111]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: elyograg@elyograg.org) by frodo.elyograg.org (Postfix) with ESMTPSA id AB5E4156; Sun, 26 Nov 2017 08:28:47 -0700 (MST) Subject: Re: help get 'count of distinct' using solr via cql against datastax? To: solr-user@lucene.apache.org References: <1511707544959-0.post@n3.nabble.com> From: Shawn Heisey Message-ID: <336a12f6-7574-85d2-27ee-674d0b67f14a@elyograg.org> Date: Sun, 26 Nov 2017 08:28:43 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1511707544959-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit archived-at: Sun, 26 Nov 2017 15:29:05 -0000 On 11/26/2017 7:45 AM, lamelylounges wrote: > I have a datastax (DSE) server with cassandra. I am running the node in > "search" mode, which means solr is enabled and working. I want to use CQL > to write a query against my core/table. I'm fairly certain that CQL is not something created by the Solr project. You're going to need to talk to either the Cassandra project or DataStax for help with CQL. Most questions about DataStax are best handled by them, even if they concern Solr, because they do a lot of customization of Solr, and only they are going to know how they've got everything configured. > If this were a traditional SQL, here is how I would write it: > SELECT COUNT(DISTINCT my_field) FROM my_table WHERE my_field LIKE 'S%' > > Is there a way to accomplish a select count distinct? Solr's facet functionality might be a lot like a distinct count. The basic facet capability shows the number of documents in the index that match each of the possible terms in the index for a given field. Because you're running the highly customized Solr in DSE, you may get better (and faster) answers from DataStax. Solr includes something in recent versions where you can access it as if it were a database. I really don't know anything about it, but there are others on this list who do: https://lucene.apache.org/solr/guide/6_6/parallel-sql-interface.html > (ps I have been trying to subscribe to this mailing list but it seems like > nabble is not sending out an initial subscribe request. I have looked in my > spam folder and have tried several different email domains) Nabble is not the mailing list. Their solr-user pages are a mirror of the mailing list in forum format. If you're having trouble with Nabble, you're going to need to talk to Nabble about it. I have never used Nabble. Here is where you can find info about the actual mailing list, which is maintained by the Apache Software Foundation: https://lucene.apache.org/solr/community.html#mailing-lists-irc Thanks, Shawn