lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koji Sekiguchi (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (SOLR-2139) Wrong cast from string to float
Date Thu, 21 Oct 2010 00:21:28 GMT

     [ https://issues.apache.org/jira/browse/SOLR-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Koji Sekiguchi reopened SOLR-2139:
----------------------------------


This is not a bug. The threshold shoud be float in solrconfig.xml:

{code}
<float name="threshold">0.0</float>
{code}

I'll revert the incorrect fix.

> Wrong cast from string to float
> -------------------------------
>
>                 Key: SOLR-2139
>                 URL: https://issues.apache.org/jira/browse/SOLR-2139
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>    Affects Versions: 4.0
>         Environment: Ubuntu 9.04 
> java.runtime.name = Java(TM) SE Runtime Environment
> sun.boot.library.path = /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386
> java.vm.version = 16.3-b01
> java.vm.vendor = Sun Microsystems Inc.
> java.vendor.url = http://java.sun.com/
> path.separator = :
> java.vm.name = Java HotSpot(TM) Server VM
> file.encoding.pkg = sun.io
> user.country = RU
> sun.java.launcher = SUN_STANDARD
> sun.os.patch.level = unknown
> java.vm.specification.name = Java Virtual Machine Specification
> user.dir = /media/data/soft/apache-solr/drupal
> java.runtime.version = 1.6.0_20-b02
> java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
> java.endorsed.dirs = /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/endorsed
> os.arch = i386
> java.io.tmpdir = /tmp
> line.separator = 
> java.vm.specification.vendor = Sun Microsystems Inc.
> os.name = Linux
> sun.jnu.encoding = UTF-8
> java.library.path = /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/server:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
> java.specification.name = Java Platform API Specification
> java.class.version = 50.0
> jetty.home = /media/data/soft/apache-solr/drupal
> sun.management.compiler = HotSpot Tiered Compilers
> os.version = 2.6.28-19-generic
> user.home = /root
> user.timezone = Asia/Omsk
> org.mortbay.jetty.Request.maxFormContentSize = 1000000
> java.awt.printerjob = sun.print.PSPrinterJob
> file.encoding = UTF-8
> java.specification.version = 1.6
> user.name = root
> java.class.path = /media/data/soft/apache-solr/drupal/lib/jetty-6.1.22.jar:/media/data/soft/apache-solr/drupal/lib/jetty-util-6.1.22.jar:/media/data/soft/apache-solr/drupal/lib/servlet-api-2.5-20081211.jar:/media/data/soft/apache-solr/drupal/lib/jsp-2.1/core-3.1.1.jar:/media/data/soft/apache-solr/drupal/lib/jsp-2.1/jsp-2.1-glassfish-9.1.1.B60.25.p2.jar:/media/data/soft/apache-solr/drupal/lib/jsp-2.1/jsp-2.1-jetty-6.1.22.jar:/media/data/soft/apache-solr/drupal/lib/jsp-2.1/jsp-api-2.1-glassfish-9.1.1.B60.25.p2.jar:/usr/share/ant/lib/ant.jar
> java.vm.specification.version = 1.0
> sun.arch.data.model = 32
> java.home = /usr/lib/jvm/java-6-sun-1.6.0.20/jre
> java.specification.vendor = Sun Microsystems Inc.
> user.language = ru
> java.vm.info = mixed mode
> java.version = 1.6.0_20
> java.ext.dirs = /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/ext:/usr/java/packages/lib/ext
> sun.boot.class.path = /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/resources.jar:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/rt.jar:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/jce.jar:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/charsets.jar:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/classes
> java.vendor = Sun Microsystems Inc.
> file.separator = /
> java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
> sun.cpu.endian = little
> sun.io.unicode.encoding = UnicodeLittle
> sun.cpu.isalist = 
>            Reporter: Igor Rodionov
>            Assignee: Koji Sekiguchi
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2139.patch
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> Class java.org.apache.solr.spelling.suggest.Suggester str 60
> Invalid cast from String to Float.
>  threshold = config.get(THRESHOLD_TOKEN_FREQUENCY) == null ? 0.0f
>             : (Float) config.get(THRESHOLD_TOKEN_FREQUENCY);
> config.get returns String, We want just cast it to Float.
> correct code should be like 
>  threshold = config.get(THRESHOLD_TOKEN_FREQUENCY) == null ? 0.0f
>             : Float.valueOf(config.get(THRESHOLD_TOKEN_FREQUENCY).trim()).floatValue();

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message