Solr
  1. Solr
  2. SOLR-3002

ClassCastException, wrong signature definition of QueryResponse.getExplainMap() - String,String given, but is String, Map

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5
    • Fix Version/s: None
    • Component/s: clients - java
    • Labels:
      None
    • Environment:

      java 1.6, linux

      Description

      I am getting this exception trying to use the explainMap stuff from query response:

      java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.lang.String

      The signature tells its <String, String> but thats not true. Signature is wrong or the code which does produce a map value should produce a string, either one needs to be fixed.

        Activity

        Hide
        Torsten Krah added a comment -

        @Mark - Trace already there, its only a "one" liner - omited main function call:

        Do:

        String s = response.getExplainMap().get("myid")

        and this should be a String object, doing this does result in a CCE.

        java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.lang.String

        Show
        Torsten Krah added a comment - @Mark - Trace already there, its only a "one" liner - omited main function call: Do: String s = response.getExplainMap().get("myid") and this should be a String object, doing this does result in a CCE. java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.lang.String
        Hide
        Yonik Seeley added a comment -

        Perhaps this is due to the structured explain format (debug.explain.structured) that was added?

        Show
        Yonik Seeley added a comment - Perhaps this is due to the structured explain format (debug.explain.structured) that was added?
        Hide
        Mark Miller added a comment -

        please post a stack trace

        Show
        Mark Miller added a comment - please post a stack trace

          People

          • Assignee:
            Unassigned
            Reporter:
            Torsten Krah
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development