Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 90780 invoked from network); 14 Apr 2005 15:10:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Apr 2005 15:10:51 -0000 Received: (qmail 55569 invoked by uid 500); 14 Apr 2005 15:09:48 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 55503 invoked by uid 500); 14 Apr 2005 15:09:47 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 55477 invoked by uid 500); 14 Apr 2005 15:09:47 -0000 Delivered-To: apmail-jakarta-lucene-dev@jakarta.apache.org Received: (qmail 55470 invoked by uid 99); 14 Apr 2005 15:09:47 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 14 Apr 2005 08:09:42 -0700 Received: by ajax.apache.org (Postfix, from userid 99) id CB00F2DF; Thu, 14 Apr 2005 17:09:35 +0200 (CEST) From: bugzilla@apache.org To: lucene-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 34453] New: - Query parts ending with a colon are handled badly X-Bugzilla-Reason: AssignedTo Message-Id: <20050414150935.CB00F2DF@ajax.apache.org> Date: Thu, 14 Apr 2005 17:09:35 +0200 (CEST) X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34453 Summary: Query parts ending with a colon are handled badly Product: Lucene Version: 1.4 Platform: PC OS/Version: Windows 2000 Status: NEW Severity: normal Priority: P2 Component: QueryParser AssignedTo: lucene-dev@jakarta.apache.org ReportedBy: ats37@hotmail.com I'm using Lucene 1.4.3, running Query query = QueryParser.parse(queryString, "contents", new StandardAnalyzer()); If queryString is "search title:" i.e. specifying a field name without a corresponding value, I get a parsing exception: Encountered "" at line 1, column 8. Was expecting one of: "(" ... ... ... ... ... "[" ... "{" ... ... If queryString is "title: search", there's no exception. However, the parsed query which is returned is "title:search". If queryString is "title: contents: text", the parsed query is "title:contents" and the "text" part is ignored completely. When queryString is "title: text contents:" the above exception is produced again. This seems inconsistent. Given that it's pointless searching for an empty string (since it has no tokens), I'd expect both "search title:" & "title: search" to be parsed as "search" (or, given the default field I specified, "contents:search"), and "title: contents: text" & "title: text contents:" to parse as "text" ("contents:text") i.e. parts which have no term are ignored. At worst I'd expect them all to throw a ParseException rather than just the ones with the colon at the end of the string. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org