Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@apache.org Received: (qmail 68470 invoked from network); 17 May 2002 12:02:19 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 17 May 2002 12:02:19 -0000 Received: (qmail 13522 invoked by uid 97); 17 May 2002 12:02:17 -0000 Delivered-To: qmlist-jakarta-archive-lucene-dev@jakarta.apache.org Received: (qmail 13491 invoked by uid 97); 17 May 2002 12:02:15 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 1646 invoked by uid 98); 17 May 2002 06:34:46 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) From: "Ralf Hettesheimer" To: "'Lucene Developers List'" Subject: AW: [Bug 8307] - WildcardQuery broken for '?' characters in query Date: Fri, 17 May 2002 08:37:13 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello, > -----Ursprungliche Nachricht----- > Von: Brian Goetz [mailto:brian@quiotix.com] > Gesendet: Donnerstag, 16. Mai 2002 23:10 > An: Lucene Developers List > Betreff: Re: [Bug 8307] - WildcardQuery broken for '?' characters in > query > > > > I have looked into the QueryParser code and the problem > appears to be the > > differentiation between a TERM and a WILDTERM. If a term > contains a question > > mark it is not treated as a WILDTERM but as a TERM because > the question mark > > is a letter that can be part of a TERM. > > This should be addressed in the unit test for the query parser. Can > you provide me with examples of the queries that are parsed > incorrectly? As I said I had attached a version of TestWildCard including some queries that fail. The essential code is: try { Query query5 = QueryParser.parse("m?tal", "body", new SimpleAnalyzer()); Query query6 = QueryParser.parse("metal?", "body", new SimpleAnalyzer()); Query query7 = QueryParser.parse("metals?", "body", new SimpleAnalyzer()); Query query8 = QueryParser.parse("m?t?ls", "body", new SimpleAnalyzer()); result = searcher.search(query5); assertEquals(1, result.length()); result = searcher.search(query6); assertEquals(2, result.length()); result = searcher.search(query7); assertEquals(1, result.length()); result = searcher.search(query8); assertEquals(3, result.length()); } catch (ParseException e) { } > > Another question concerning the QueryParser. I made another change > > to the QueryParser (QueryParser2.jj) that allows to search for terms > > starting with a wildcard. Is there any reason why Lucene does not > > support this by default? > > This was deliberate. It would be a performance disaster. Are there any performance numbers that can underline this? Thanks Ralf -- To unsubscribe, e-mail: For additional commands, e-mail: