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 3B188200C02 for ; Fri, 6 Jan 2017 03:19:08 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 39B25160B42; Fri, 6 Jan 2017 02:19:08 +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 5F0E4160B33 for ; Fri, 6 Jan 2017 03:19:07 +0100 (CET) Received: (qmail 40737 invoked by uid 500); 6 Jan 2017 02:19:05 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 40726 invoked by uid 99); 6 Jan 2017 02:19:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2017 02:19:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 28D09C13F5 for ; Fri, 6 Jan 2017 02:19:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id JHHfTIWiVQgS for ; Fri, 6 Jan 2017 02:19:03 +0000 (UTC) Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com [209.85.217.169]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 34AA65F644 for ; Fri, 6 Jan 2017 02:19:03 +0000 (UTC) Received: by mail-ua0-f169.google.com with SMTP id i68so290975247uad.0 for ; Thu, 05 Jan 2017 18:19:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=cImekEQ8Jkk8/H4nBBNSjKIkbvnCuo2zOLMgDyKvatQ=; b=GXgMRl2kXmuVqjLwc/5qjDdh6va+2PGTWPi+sV/hjS0Jo+Kw5wYeyDK2CYhtHIqeAd dAJQ01Rr5DAnVkcBpzPaYvKz+qQhEmbHcYE5wnURZU3oH/o+548aqa0AkvEoJxtkz4d6 +gvYuWOfopwftGHvzeHpImkZLBh/qfhWpD/1C4/9yRlC0B7Ln6tddY91LqVBmE8g4sjM Dv4A8QtycwYVCTbOrwV7xrrHGRTCal4g6KD6m0OuCWfsJgzzwtaoy17ZXdHh9s8K5Hu1 Lt9GEtUKsYSN2Adtbc73v3FJ5msYPB2vvzKlt3cZsvTccPamRm0LVkVLGfWu1ts+nppn w3FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=cImekEQ8Jkk8/H4nBBNSjKIkbvnCuo2zOLMgDyKvatQ=; b=kkieygk8juPkxXcAQSiF7FbIlwBcLRQNDTz6pdtCId5IpJ9WvejeJSVevyq4xQ4qoV b3lzVEJ8T1uTCFq1bWxjShu2IEfY28jPoQW2evOSlxowSEE1pCRD8l9mWjLpYDgMPG5/ qh1p4I9HWFw4FHoJvMteG7+3t9ZjMSrBPnviXOgcEDqgW/vN4yYu/nEzF83L+dc3RPiw tOA31byBKKhv+s4mdwefuUt9VNLoE0+1rICNrDjcP6YiWP0YKZogIL1BK8lk7vY0F86d uBA3QiQDGZGUBiju8bhdH/xQVVdFHwIfor7OLXRsKJHiwJs30ffi+8bHELWZ1mo5XSxn qfVA== X-Gm-Message-State: AIkVDXJEM4gmM4L9risE67ZyBxR0R+C3Gdqu++orWqrfU7VgK64I1T/oJ7ird5shCW7uN9/tvoPkRx1R73T/+g== X-Received: by 10.176.7.134 with SMTP id c6mr37656927uaf.172.1483669141915; Thu, 05 Jan 2017 18:19:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.74.150 with HTTP; Thu, 5 Jan 2017 18:19:01 -0800 (PST) In-Reply-To: References: From: Voytek Jarnot Date: Thu, 5 Jan 2017 20:19:01 -0600 Message-ID: Subject: Re: Odd behavior when querying using two SASI indexes To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f403045f813a2b0c2f054563a4e4 archived-at: Fri, 06 Jan 2017 02:19:08 -0000 --f403045f813a2b0c2f054563a4e4 Content-Type: text/plain; charset=UTF-8 Opened https://issues.apache.org/jira/browse/CASSANDRA-13105 because it does seem like this should work. On Wed, Jan 4, 2017 at 5:53 PM, Voytek Jarnot wrote: > Seeing queries return 0 rows incorrectly, running 3.9 > > Setup: > > create table test1(id1 text PRIMARY KEY, val1 text, val2 text); > > create custom index test1_idx_val1 on test1(val1) using > 'org.apache.cassandra.index.sasi.SASIIndex'; > create custom index test1_idx_val2 on test1(val2) using > 'org.apache.cassandra.index.sasi.SASIIndex'; > > insert into test1(id1, val1, val2) values ('1', '1val1', '1val2'); > insert into test1(id1, val1, val2) values ('2', '~~', '2val2'); > > Queries: > > (1) select * from test1 where val1 = '~~'; > (2) select * from test1 where val1 < '~~' allow filtering; > (3) select * from test1 where val2 = '1val2'; > (4) select * from test1 where val1 < '~~' and val2 = '1val2' allow > filtering; > > 1, 2, and 3 all work correctly. 4 does not work. 2, 3, and 4 should > return the same row (id1='1'); 2 and 3 do, 4 returns 0 rows. > > Weird, because you'd think that if 2 works fine, then 4 ought to as well. > > Anyone else run into this? Not sure if I'm breaking a where-clause rule, > or if I'm running into a bug. > > Thanks. > --f403045f813a2b0c2f054563a4e4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Wed, Jan 4, 2017 at 5:53 PM, Voytek J= arnot <voytek.jarnot@gmail.com> wrote:
Seeing queries return 0 rows incor= rectly, running 3.9

Setup:

crea= te table test1(id1 text PRIMARY KEY, val1 text, val2 text);

<= /div>
create custom index test1_idx_val1 on test1(val1) using 'org.= apache.cassandra.index.sasi.SASIIndex';
create custom in= dex test1_idx_val2 on test1(val2) using 'org.apache.cassandra.index.sasi.SASIIndex';

insert into test1(id1, val1= , val2) values ('1', '1val1', '1val2');
i= nsert into test1(id1, val1, val2) values ('2', '~~', '2= val2');

Queries:

(1) select * from test1 where val1 =3D '~~';
(2) s= elect * from test1 where val1 < '~~' allow filtering;
<= div>(3) select * from test1 where val2 =3D '1val2';
(= 4) select * from test1 where val1 < '~~' and val2 =3D '1val2= ' allow filtering;

1, 2, and 3 all w= ork correctly. =C2=A04 does not work. =C2=A02, 3, and 4 should return the s= ame row (id1=3D'1'); 2 and 3 do, 4 returns 0 rows.

Weird, because you'd think that if 2 works fine, then 4 ought = to as well.

Anyone else run into this?=C2=A0 Not s= ure if I'm breaking a where-clause rule, or if I'm running into a b= ug.

Thanks.

--f403045f813a2b0c2f054563a4e4--