Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-840

BinaryResponseWriter does not handle nulls with shards as it does locally

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: search
    • Labels:
      None
    • Environment:

      All

      Description

      When you query a number field
      locally, it can return null. However, when you go through a shard if
      you have an empty number it throws an error.

      I found wrapping the BinaryResponseWrite with a try/catch solved the
      problem and allows null values to be returned.

      BinaryResponseWriter.java:141
      try

      { val = useFieldObjects ? ft.toObject(f) : ft.toExternal(f); }

      catch (NumberFormatException e)

      { val = null; }

      It seems only the BinaryResponseWriter is actually that fussy about
      null items. Once it comes back to the client for display, it is
      handled without error.

      Hoss suggested this should be fixed for 1.3 but now that it has shipped I have marked it as 1.3.1 (
      See: http://www.nabble.com/best-way-to-debug-shard-format-errors-td19087854.html)

        Attachments

          Activity

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              iconnor ian connor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified