Bug in DismaxRequestHanlder?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in DismaxRequestHanlder?

Thierry Collogne
Hello,

I think I have uncovered a bug.

When I run the following query :

http://localhost:8666/solr/select/?q=test+lettre&version=2.2&start=0&rows=10&indent=on&qt=dismax

I get the following exception :


HTTP Status 500 - For input string: "" java.lang.NumberFormatException: For
input string: "" at java.lang.NumberFormatException.forInputString(
NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:468)
at java.lang.Integer.<init>(Integer.java:620) at
org.apache.solr.util.SolrPluginUtils.calculateMinShouldMatch(
SolrPluginUtils.java:614) at
org.apache.solr.util.SolrPluginUtils.setMinShouldMatch(SolrPluginUtils.java:575)
at org.apache.solr.request.DisMaxRequestHandler.handleRequestBody(
DisMaxRequestHandler.java:244) at
org.apache.solr.handler.RequestHandlerBase.handleRequest(
RequestHandlerBase.java:77) at org.apache.solr.core.SolrCore.execute(
SolrCore.java:658) at org.apache.solr.servlet.SolrDispatchFilter.execute(
SolrDispatchFilter.java:191) at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:159)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173) at
org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213) at
org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664) at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527) at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80) at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)


The exception only happens when using the DismaxRequestHandler and a
combination of 2 search words (ex. test lettre)

Can someone please, confirm this? Does anyone know a workaround?

I am using the final solr 1.2 release.

Greetings
Reply | Threaded
Open this post in threaded view
|

Re: Bug in DismaxRequestHanlder?

Chris Hostetter-3
: When I run the following query :
:
: http://localhost:8666/solr/select/?q=test+lettre&version=2.2&start=0&rows=10&indent=on&qt=dismax

: HTTP Status 500 - For input string: "" java.lang.NumberFormatException: For
: input string: "" at java.lang.NumberFormatException.forInputString(
: NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:468)
: at java.lang.Integer.<init>(Integer.java:620) at
: org.apache.solr.util.SolrPluginUtils.calculateMinShouldMatch(

That exception seems to indicate that the value of your "mm" option is set
to the empty string.  if you had no value specified, then it would default
to the string "100%"

since there is no "mm" param in the URL you listed, i'm assuming your
solrconfig.xml has a default "mm" param specifeid and it is the empty
string (or perhaps all whitespace)

if you set that to a legal "minShouldMatch" string (or remove it
completely) things should work fine.


if you'd like, feel free to open a bug requesting a better error message
when "mm" can't be parsed cleanly. (please note the "" causes
NumFormatException as the motivation for the bug)


-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: Bug in DismaxRequestHanlder?

Thierry Collogne
Thanks! Removing the entry in the config file fixed it.
Could please explain to me what the property does exactly? It is not clear
to me.

On 19/06/07, Chris Hostetter <[hidden email]> wrote:

>
> : When I run the following query :
> :
> :
> http://localhost:8666/solr/select/?q=test+lettre&version=2.2&start=0&rows=10&indent=on&qt=dismax
>
> : HTTP Status 500 - For input string: "" java.lang.NumberFormatException:
> For
> : input string: "" at java.lang.NumberFormatException.forInputString(
> : NumberFormatException.java:48) at java.lang.Integer.parseInt(
> Integer.java:468)
> : at java.lang.Integer.<init>(Integer.java:620) at
> : org.apache.solr.util.SolrPluginUtils.calculateMinShouldMatch(
>
> That exception seems to indicate that the value of your "mm" option is set
> to the empty string.  if you had no value specified, then it would default
> to the string "100%"
>
> since there is no "mm" param in the URL you listed, i'm assuming your
> solrconfig.xml has a default "mm" param specifeid and it is the empty
> string (or perhaps all whitespace)
>
> if you set that to a legal "minShouldMatch" string (or remove it
> completely) things should work fine.
>
>
> if you'd like, feel free to open a bug requesting a better error message
> when "mm" can't be parsed cleanly. (please note the "" causes
> NumFormatException as the motivation for the bug)
>
>
> -Hoss
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Bug in DismaxRequestHanlder?

Chris Hostetter-3

: Thanks! Removing the entry in the config file fixed it.
: Could please explain to me what the property does exactly? It is not clear
: to me.

I've never had much of a chacne to write really good docs on the
DisMaxRequestHandler (anyone want to voluneet?) ... BUT! "mm" is one of
the few options that does have fairly detailed docs...

As the DisMaxRequestHandler wiki page notes: "...the DisMax Request
Handler supports several other options which can be found in the
DisMaxRequestHandler javadocs."

Following the link we see a summary list of all the params, with this
description for "mm" ...

mm - (Minimum Match) this supports a wide variety of complex expressions.
read SolrPluginUtils.setMinShouldMatch and mm expression format for
details.

where "mm expression format" is a link to...
http://lucene.apache.org/solr/api/org/apache/solr/util/doc-files/min-should-match.html


http://wiki.apache.org/solr/DisMaxRequestHandler
http://lucene.apache.org/solr/api/org/apache/solr/handler/DisMaxRequestHandler.html


-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: Bug in DismaxRequestHanlder?

Thierry Collogne
Ok. Thanks. I will read up on it.

On 19/06/07, Chris Hostetter <[hidden email]> wrote:

>
>
> : Thanks! Removing the entry in the config file fixed it.
> : Could please explain to me what the property does exactly? It is not
> clear
> : to me.
>
> I've never had much of a chacne to write really good docs on the
> DisMaxRequestHandler (anyone want to voluneet?) ... BUT! "mm" is one of
> the few options that does have fairly detailed docs...
>
> As the DisMaxRequestHandler wiki page notes: "...the DisMax Request
> Handler supports several other options which can be found in the
> DisMaxRequestHandler javadocs."
>
> Following the link we see a summary list of all the params, with this
> description for "mm" ...
>
> mm - (Minimum Match) this supports a wide variety of complex expressions.
> read SolrPluginUtils.setMinShouldMatch and mm expression format for
> details.
>
> where "mm expression format" is a link to...
>
> http://lucene.apache.org/solr/api/org/apache/solr/util/doc-files/min-should-match.html
>
>
> http://wiki.apache.org/solr/DisMaxRequestHandler
>
> http://lucene.apache.org/solr/api/org/apache/solr/handler/DisMaxRequestHandler.html
>
>
> -Hoss
>
>