From dev-return-30343-archive-asf-public=cust-asf.ponee.io@geode.apache.org Mon Nov 26 22:03:48 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 68FCC180647 for ; Mon, 26 Nov 2018 22:03:48 +0100 (CET) Received: (qmail 59458 invoked by uid 500); 26 Nov 2018 21:03:47 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 59435 invoked by uid 99); 26 Nov 2018 21:03:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2018 21:03:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 675ADCBB94 for ; Mon, 26 Nov 2018 21:03:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.299 X-Spam-Level: * X-Spam-Status: No, score=1.299 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 5SGe_ofkpzir for ; Mon, 26 Nov 2018 21:03:44 +0000 (UTC) Received: from mx0b-00296801.pphosted.com (mx0b-00296801.pphosted.com [148.163.153.148]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D62A660FB9 for ; Mon, 26 Nov 2018 20:57:29 +0000 (UTC) Received: from pps.filterd (m0114584.ppops.net [127.0.0.1]) by mx0b-00296801.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wAQKulsA030089 for ; Mon, 26 Nov 2018 20:57:29 GMT Received: from mail-it1-f198.google.com (mail-it1-f198.google.com [209.85.166.198]) by mx0b-00296801.pphosted.com with ESMTP id 2nxxdg9kjs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 26 Nov 2018 20:57:29 +0000 Received: by mail-it1-f198.google.com with SMTP id g7so14506203itg.7 for ; Mon, 26 Nov 2018 12:57:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=A7CwL+mxbLFiUoUOqM2Vax/86B3xaSQcc4lBEhQfhns=; b=oc50kPk4B9BKxY1Z659/2ufsg7mF6TFTyis12CqI+p1mWBA6BHG/Iq3eGzI2E80gen YvrvYVIaeLVQ909TpjqEBO/zeUKOY7GJ1jcDmX/9JmgJLENC1PQJC1ymzlbUqSUyRcC0 RFtnG4Tm2nIwB/8u4JU2MNSOQOaSIkPLTq/z6Vv1sSXDxS/jpOOvsQfTrEQx0Flopjte vc65UNP2PPdX+btzUYFCH5LEXuqqbRhov98+YnRiyOyBguxFEplTkEsiJF4S2QwZtXuZ 4DL+bnaeXlHqePfwazbh7kTBYQT9ZDwMdC/H0UEYQy7cRkjU9a0GloJBt0CxwOKLB9dg ZmEg== X-Gm-Message-State: AA+aEWa2Mbz9vVjBvenRgJfAh/q+43XtZCC8qyt2bWpzeuE02KVk/T0x YcfrO6ExwfUFBZ+8rWOqvaHwpfFxFLUD0yBbLmjc7vbcsNoNYyLTASuKluoB8G4aEtxXCAK+vnf vrWQm3Hq6IloRrXSFdHlcF61DZEFXvmXbMXv0Q+kWTijX0apB08NtEF8= X-Received: by 2002:a02:4d99:: with SMTP id t25mr13140445jad.58.1543265848599; Mon, 26 Nov 2018 12:57:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/W8RxFIb9bJ3KsHP+sQ2JZfaTRD8zm6ID2RDsaLNuCTrvzPU8c05Aolx9Joo9D6G2px5ZCfv6dKNCQJHWQcNr0= X-Received: by 2002:a02:4d99:: with SMTP id t25mr13140429jad.58.1543265848295; Mon, 26 Nov 2018 12:57:28 -0800 (PST) MIME-Version: 1.0 References: <1543202373261-0.post@n6.nabble.com> In-Reply-To: From: Jason Huynh Date: Mon, 26 Nov 2018 12:58:16 -0800 Message-ID: Subject: Re: Adding index for Like operartor To: geode Content-Type: multipart/alternative; boundary="000000000000aea263057b979435" X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-26_16:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811260178 --000000000000aea263057b979435 Content-Type: text/plain; charset="UTF-8" Key indexes tell the query engine that the field is the same as the key that was used to put into the underlying region. So let's say your field is "ID". Creating a key index tells the query engine that a "select * from /region theRegion where ID = 1" is the same as doing : theRegion.get(1). In this case I think you are looking for a functional index. Those are sorted and will be used for like queries. On Mon, Nov 26, 2018 at 12:52 PM Alexander Murmann wrote: > Hi, > > Have you thought about using the built-in Lucene functionality for this? > Fuzzy text search is exactly what it's made for. > > On Mon, Nov 26, 2018 at 12:15 PM anjana_nair > wrote: > > > > > Hi, > > > > I would like to add an index to key (keyindex) and the query executed is > > going to be like > > > > "constantstring%" where constant string is going to be the constant > > prefix in a lile query. In this case can we just go ahead with key index > > or > > should we use a function index ? key indexes are not sorted ? > > > > > > > > -- > > Sent from: > > http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/ > > > --000000000000aea263057b979435--