lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-950) IllegalArgumentException parsing "foo~1"
Date Thu, 05 Jul 2007 16:46:05 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510403
] 

Grant Ingersoll commented on LUCENE-950:
----------------------------------------

Hmmm, this isn't really an error (see http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/org/apache/lucene/search/FuzzyQuery.html)
but I can also see that the QueryParser Syntax (http://lucene.apache.org/java/docs/queryparsersyntax.html)
doesn't explicitly state that 1 is excluded, even if the Javadocs do.  It says:
    "Starting with Lucene 1.9 an additional (optional) parameter can specify the required
similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher
similarity will be matched."

I could see that a patch saying something like "The value is between 0 and 1 (but not including
1), with a value closer ..."  would be appropriate.

So, I will leave this open for now, even though I feel the QueryParser and FuzzyQuery are
operating correctly.


> 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
>
> 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


Mime
View raw message