From solr-user-return-144892-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Fri Nov 9 08:38:14 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 809D9180627 for ; Fri, 9 Nov 2018 08:38:13 +0100 (CET) Received: (qmail 14535 invoked by uid 500); 9 Nov 2018 07:38:11 -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 14518 invoked by uid 99); 9 Nov 2018 07:38:10 -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; Fri, 09 Nov 2018 07:38:10 +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 B80341910E9 for ; Fri, 9 Nov 2018 07:38:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.202 X-Spam-Level: X-Spam-Status: No, score=-0.202 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 lVfIf2rEsve8 for ; Fri, 9 Nov 2018 07:38:08 +0000 (UTC) Received: from frodo.elyograg.org (frodo.elyograg.org [166.70.79.217]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3D43E62496 for ; Fri, 9 Nov 2018 07:38:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by frodo.elyograg.org (Postfix) with ESMTP id 681ED22F6 for ; Fri, 9 Nov 2018 00:38:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=elyograg.org; h= content-language:content-transfer-encoding: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=1541749072; bh=UuQerA80sjwuyLwKsSUxILl3fo2e IxQHns4L+wKH7eE=; b=vQhYyfY9TB3zmV25bRmQw0dBJlhJRKhHTNfgAyZaRpAN gxRBFWE5nI7C4/iwutLJEI6kMSZnvCL1hcJ4cl2qLxU4kJlYjSjH30Vp7oqEhKEO /JD52b9UR27P78CNe9qdDvGxO3E4s3jopLCyqlrNpDJdxgA2O3tMsP6w6MUFRMY= 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 Njple1fH7tmX for ; Fri, 9 Nov 2018 00:37:52 -0700 (MST) Received: from [192.168.1.103] (103.int.elyograg.org [192.168.1.103]) (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 074E422ED for ; Fri, 9 Nov 2018 00:37:52 -0700 (MST) Subject: Re: Does an empty query value can cause an "org.apache.solr.search.SyntaxError" error? To: solr-user@lucene.apache.org References: <1541592636150-0.post@n3.nabble.com> <1541658985682-0.post@n3.nabble.com> From: Shawn Heisey Message-ID: <44ed051e-58dd-c65c-ad5c-fe2c8d867672@elyograg.org> Date: Fri, 9 Nov 2018 00:37:52 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1541658985682-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US On 11/7/2018 11:36 PM, nettadalet wrote: > Shawn Heisey-2 wrote >> I do think that it is proper for empty parentheses to throw a syntax >> error.  The text of the exception message is saying that the parser >> encountered the ) character at a point when it did not expect to >> encounter that character. A little further thought on this: When using code to construct query strings, I think a situation can easily arise where a query clause is optional, and the "()" string, with or without whitespace between the parentheses, ends up in the generated query. I understand why the query parser complains about that syntax ... but I don't think it would be unreasonable for Solr's query parsers (lucene and edismax probably) to just handle it as if it were not there. My bias would be to open an enhancement issue in Jira.  I did some searching and didn't find an existing issue, which is surprising. It could be that there's an existing issue but I was not searching for the right keywords.  Before an issue is opened, I'd like to hear what the community thinks. Thanks, Shawn