You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adriano Crestani (JIRA)" <ji...@apache.org> on 2009/08/26 23:01:59 UTC
[jira] Updated: (LUCENE-950) IllegalArgumentException parsing
"foo~1"
[ https://issues.apache.org/jira/browse/LUCENE-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adriano Crestani updated LUCENE-950:
------------------------------------
Attachment: lucene_950_08_26_2009.patch
This patch fixes the bug, it no longer throws IllegalArgumentException when the user enters fuzzy queries with similarity greater or equals 1, instead, it converts the FuzzyQuery into a simple TermQuery, ignoring the fuzzy value.
> IllegalArgumentException parsing "foo~1"
> ----------------------------------------
>
> Key: LUCENE-950
> URL: https://issues.apache.org/jira/browse/LUCENE-950
> Project: Lucene - Java
> Issue Type: Bug
> Components: QueryParser
> Affects Versions: 2.1, 2.2
> Environment: Java 1.5
> Reporter: Eleanor Joslin
> Priority: Minor
> Attachments: lucene_950_08_26_2009.patch
>
>
> If I run this:
> QueryParser parser = new QueryParser("myField", new SimpleAnalyzer());
> try {
> parser.parse("foo~1");
> }
> catch (ParseException e) {
> // OK
> }
> I get this:
> Exception in thread "main" java.lang.IllegalArgumentException: minimumSimilarity >= 1
> at org.apache.lucene.search.FuzzyQuery.<init>(FuzzyQuery.java:58)
> at org.apache.lucene.queryParser.QueryParser.getFuzzyQuery(QueryParser.java:711)
> at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1090)
> at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:979)
> at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:907)
> at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:896)
> at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:146)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org