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 4DE2BD6AF for ; Tue, 14 Aug 2012 12:38:09 +0000 (UTC) Received: (qmail 58860 invoked by uid 500); 14 Aug 2012 12:38:07 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 58826 invoked by uid 500); 14 Aug 2012 12:38:07 -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 58818 invoked by uid 99); 14 Aug 2012 12:38:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2012 12:38:06 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of SRS0=WZmi+o=GO=basetechnology.com=jack@yourhostingaccount.com designates 65.254.253.37 as permitted sender) Received: from [65.254.253.37] (HELO mailout04.yourhostingaccount.com) (65.254.253.37) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2012 12:37:59 +0000 Received: from mailscan02.yourhostingaccount.com ([10.1.15.2] helo=mailscan02.yourhostingaccount.com) by mailout04.yourhostingaccount.com with esmtp (Exim) id 1T1GNN-0005Hx-Si for java-user@lucene.apache.org; Tue, 14 Aug 2012 08:37:37 -0400 Received: from impout01.yourhostingaccount.com ([10.1.55.1] helo=impout01.yourhostingaccount.com) by mailscan02.yourhostingaccount.com with esmtp (Exim) id 1T1GNO-0000Ws-B4 for java-user@lucene.apache.org; Tue, 14 Aug 2012 08:37:38 -0400 Received: from authsmtp03.yourhostingaccount.com ([10.1.18.3]) by impout01.yourhostingaccount.com with NO UCE id mcde1j00403yUm201cdec8; Tue, 14 Aug 2012 08:37:38 -0400 X-Authority-Analysis: v=2.0 cv=I97ntacg c=1 sm=1 a=PHQHB1QSaEYgcU2qnZkzMw==:17 a=aQzbgH187woA:10 a=fe7m66E7vrsA:10 a=3jZET7lWBKwA:10 a=8nJEP1OIZ-IA:10 a=jvYhGVW7AAAA:8 a=dqwI7JQFRxcA:10 a=pGLkceISAAAA:8 a=mV9VRH-2AAAA:8 a=dPyjCQ3LK18ZkH5-XUAA:9 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10 a=maIvl2Yd+fJND/e85XqkCw==:117 X-EN-OrigOutIP: 10.1.18.3 X-EN-IMPSID: mcde1j00403yUm201cdec8 Received: from 207-237-102-116.c3-0.nyr-ubr1.nyr.ny.cable.rcn.com ([207.237.102.116] helo=JackKrupansky) by authsmtp03.yourhostingaccount.com with esmtpa (Exim) id 1T1GNL-0005Ho-Km for java-user@lucene.apache.org; Tue, 14 Aug 2012 08:37:35 -0400 Message-ID: <72DBD0F4CBA2451F8F8AD1D272A77F8E@JackKrupansky> From: "Jack Krupansky" To: References: In-Reply-To: Subject: Re: Does the string "Cla$$War" affect Lucene? Date: Tue, 14 Aug 2012 08:37:16 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3555.308 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308 X-EN-UserInfo: e0a4b55451ed9f27313ebf02e3d4348d:fc4a93e1349e680c52bdd723c0ab3ef6 X-EN-AuthUser: jack@basetechnology.com Sender: "Jack Krupansky" X-EN-OrigIP: 207.237.102.116 X-EN-OrigHost: 207-237-102-116.c3-0.nyr-ubr1.nyr.ny.cable.rcn.com X-Virus-Checked: Checked by ClamAV on apache.org Add qp.setAutoGeneratePhraseQueries = true before calling qp.parse. Otherwise, the query (clause of the larger BooleanQuery) will be the same as "cla" OR "war", which will match all "war" documents, plus any "cla" documents you may have. -- Jack Krupansky -----Original Message----- From: zhoucheng2008 Sent: Tuesday, August 14, 2012 8:29 AM To: java-user Subject: Re: Does the string "Cla$$War" affect Lucene? BooleanQuery bq; QueryParser qp; qp = new QueryParser(version, "title", analyzer); bq.add(qp.parse(QueryParser.escape("Cla$$War")), Occur.valueOf("MUST")); version = Version.LUCENE_35; analyzer = new LimitTokenCountAnalyzer(new StandardAnalyzer( Version.LUCENE_35, CharArraySet.EMPTY_SET), ERConstants.maxTokenNum); Is it because of the QueryParser.escape()? ------------------ Original ------------------ From: "Ian Lea"; Date: Tue, Aug 14, 2012 04:39 PM To: "java-user"; Subject: Re: Does the string "Cla$$War" affect Lucene? Sounds extremely unlikely. What is the query? What analyzer? What version of lucene? What about other strings containing $$? -- Ian. On Tue, Aug 14, 2012 at 9:13 AM, zhoucheng2008 wrote: > Hi, > > > I have a big index, and when I searched it with a title string "Cla$$War", > Lucene became very slow. It doesn't happen when I searched with other > title string such as "Gone with Wind". Does the "$$" affect the search > performance? > > > Thanks, > Cheng --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org