Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A01E18FEC for ; Sat, 28 Nov 2015 05:57:33 +0000 (UTC) Received: (qmail 58169 invoked by uid 500); 28 Nov 2015 05:57:31 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 58113 invoked by uid 500); 28 Nov 2015 05:57:31 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 58101 invoked by uid 99); 28 Nov 2015 05:57:31 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Nov 2015 05:57:31 +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 BCDA1180A5F for ; Sat, 28 Nov 2015 05:57:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.344 X-Spam-Level: ** X-Spam-Status: No, score=2.344 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-0.554, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ZtU8efy1GYD3 for ; Sat, 28 Nov 2015 05:57:24 +0000 (UTC) Received: from nm1-vm6.bullet.mail.ne1.yahoo.com (nm1-vm6.bullet.mail.ne1.yahoo.com [98.138.91.253]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 0A93320BC2 for ; Sat, 28 Nov 2015 05:57:22 +0000 (UTC) Received: from [98.138.101.132] by nm1.bullet.mail.ne1.yahoo.com with NNFMP; 28 Nov 2015 05:57:16 -0000 Received: from [98.138.89.246] by tm20.bullet.mail.ne1.yahoo.com with NNFMP; 28 Nov 2015 05:57:16 -0000 Received: from [127.0.0.1] by omp1060.mail.ne1.yahoo.com with NNFMP; 28 Nov 2015 05:57:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 396110.21140.bm@omp1060.mail.ne1.yahoo.com X-YMail-OSG: Me1LOu8VM1mkNs981gMvWBK82nsiR_.qQubYln6OZbSmmOWpPphnlN2ucmeHqcB kPRLPLw_U8e1fabr788aCJ6_z9XXnewkyC2b2gcTE_PTvmIHCusb42QHIH4bpijSt3A0JXQaqWrQ lwsoRQxu5grSoAL2._iP61Yjqy3o87SZwTJ3_GNw31rzQRgFEKgtkQFeRurp0Ul_7PG130SylYjK RXKUMdset33BzKtdF7U20ABRDRJ45ghai6usM__0vBLO1ewV9x52gufHVpJj0EZN3mHQe.2d3IEI OeAXelzPKflOHTe0oIrw8FwlDLmPQW8J3enLuVozJ_vY24Ve4esNXUjBcs78mR4mXPe5VPTuDu41 D2IN8japOYvmyyKvpCA_QGynMQo2.V8mBESafuO.KmLtLBlVtWzCd07S3LFY5ACnoozgC7.K6AWC 2VR7LVXjYZ.1Lc.laSMWkoBsszedCiM0g446SSlyEZCGlq_KJ5o0RXbXDC7EXQCMvnq_eYoPba1k AvOfU6eef31IYb2hK Received: by 98.138.105.242; Sat, 28 Nov 2015 05:57:15 +0000 Date: Sat, 28 Nov 2015 05:57:15 +0000 (UTC) From: Sandeep Khanzode Reply-To: Sandeep Khanzode To: Lucene Users Message-ID: <1998297395.9572552.1448690235682.JavaMail.yahoo@mail.yahoo.com> Subject: Determine whether a MatchAllQuery or a Query with atleast one Term MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9572551_533182092.1448690235680" References: <1998297395.9572552.1448690235682.JavaMail.yahoo.ref@mail.yahoo.com> ------=_Part_9572551_533182092.1448690235680 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I have a question. In my program, I need to check whether the input query is a MatchAll Query = that contains no terms, or a Query (any variant) that has at least one term= . For typical Term queries, this seems reasonable to be done with Query.ext= ractTerms(Set<> terms) which gives the list of terms.=C2=A0 However, when there is a NumericRangeQuery, this method throws an Unsupport= edOperationException. How can I determine that a NumericRangeQuery or any non-Term query exists i= n the Input Query and differentiate it from the MatchAllQuery?=C2=A0-- SRK ------=_Part_9572551_533182092.1448690235680--