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"<[email protected]>;
Date: Tue, Aug 14, 2012 04:39 PM
To: "java-user"<[email protected]>;
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 <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]