[jira] Created: (NUTCH-287) Exception when searching with sort

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (NUTCH-287) Exception when searching with sort

Michael Gibney (Jira)
Exception when searching with sort
----------------------------------

         Key: NUTCH-287
         URL: http://issues.apache.org/jira/browse/NUTCH-287
     Project: Nutch
        Type: Bug

  Components: searcher  
    Versions: 0.8-dev    
    Reporter: Stefan Neufeind
    Priority: Critical


Running a search with      &sort=url works.
But when using    &sort=title   I get the following exception.

2006-05-25 14:04:25 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.lang.RuntimeException: Unknown sort value type!
        at org.apache.nutch.searcher.IndexSearcher.translateHits(IndexSearcher.java:157)
        at org.apache.nutch.searcher.IndexSearcher.search(IndexSearcher.java:95)
        at org.apache.nutch.searcher.NutchBean.search(NutchBean.java:239)
        at org.apache.jsp.search_jsp._jspService(search_jsp.java:257)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

What is in those lines is:

      WritableComparable sortValue;               // convert value to writable
      if (sortField == null) {
        sortValue = new FloatWritable(scoreDocs[i].score);
      } else {
        Object raw = ((FieldDoc)scoreDocs[i]).fields[0];
        if (raw instanceof Integer) {
          sortValue = new IntWritable(((Integer)raw).intValue());
        } else if (raw instanceof Float) {
          sortValue = new FloatWritable(((Float)raw).floatValue());
        } else if (raw instanceof String) {
          sortValue = new UTF8((String)raw);
        } else {
          throw new RuntimeException("Unknown sort value type!");
        }
      }


So I thought that maybe raw is an instance of something "strange" and tried raw.getClass().getName() or also raw.toString() to track the cause down - but that always resulted in a NullPointerException. So it seems I'm having raw being null for some strange reason.

When I try with "title2" (or something none-existing) I get a different error that title2 is unknown / not indexed. So I suspect that title should be fine here ...

If there is any information I can help out with, let me know.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (NUTCH-287) Exception when searching with sort

Michael Gibney (Jira)
     [ http://issues.apache.org/jira/browse/NUTCH-287?page=all ]
     
Stefan Groschupf closed NUTCH-287:
----------------------------------

    Resolution: Won't Fix

http://www.mail-archive.com/nutch-user%40lucene.apache.org/msg04696.html

> Exception when searching with sort
> ----------------------------------
>
>          Key: NUTCH-287
>          URL: http://issues.apache.org/jira/browse/NUTCH-287
>      Project: Nutch
>         Type: Bug

>   Components: searcher
>     Versions: 0.8-dev
>     Reporter: Stefan Neufeind
>     Priority: Critical

>
> Running a search with      &sort=url works.
> But when using    &sort=title   I get the following exception.
> 2006-05-25 14:04:25 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
> java.lang.RuntimeException: Unknown sort value type!
>         at org.apache.nutch.searcher.IndexSearcher.translateHits(IndexSearcher.java:157)
>         at org.apache.nutch.searcher.IndexSearcher.search(IndexSearcher.java:95)
>         at org.apache.nutch.searcher.NutchBean.search(NutchBean.java:239)
>         at org.apache.jsp.search_jsp._jspService(search_jsp.java:257)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
> What is in those lines is:
>       WritableComparable sortValue;               // convert value to writable
>       if (sortField == null) {
>         sortValue = new FloatWritable(scoreDocs[i].score);
>       } else {
>         Object raw = ((FieldDoc)scoreDocs[i]).fields[0];
>         if (raw instanceof Integer) {
>           sortValue = new IntWritable(((Integer)raw).intValue());
>         } else if (raw instanceof Float) {
>           sortValue = new FloatWritable(((Float)raw).floatValue());
>         } else if (raw instanceof String) {
>           sortValue = new UTF8((String)raw);
>         } else {
>           throw new RuntimeException("Unknown sort value type!");
>         }
>       }
> So I thought that maybe raw is an instance of something "strange" and tried raw.getClass().getName() or also raw.toString() to track the cause down - but that always resulted in a NullPointerException. So it seems I'm having raw being null for some strange reason.
> When I try with "title2" (or something none-existing) I get a different error that title2 is unknown / not indexed. So I suspect that title should be fine here ...
> If there is any information I can help out with, let me know.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira