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

LatLonPointSpatialField doesn't work with RealTimeGetComponent

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      LatLonDocValuesField is used by LatLonPointSpatialField field type to store doc values. It does this by encoding the two double values into a long. If the field is part of a document which takes place within a atomic update operation RealTimeGetComponent is used to load the field values from the index.

      If the request is a nested request (line number 654: isNestedRequest is set by DistributedUpdateProcessor to Resolution.ROOT_WITH_CHILDREN) all field values from the schema are copied into a SolrInputDocument (line 678).

      The copy is implemented by toSolrInputDocument method (line 728 of RealTimeGetComponent). The method retrieves the FieldType of the SchemaField and calls the toObject method (line 740). In case of LatLonPointSpatialField type, when docValues is set to true and stored is set to false, the fieldData is stored by a  LatLonDocValuesField instance.

      The toObject method is implemented by the base class FieldType toExternal with the LatLonDocValuesField instance (line 373). In line 359 the method stringValue of the Field is called. The default implementation (line 259) checks if the fieldsData is either CharSequence or a Number and calls fieldsData.toString.

      Because fieldsData is of type Long in LatLonDocValuesField class the value is not decoded correctly.

      From my opinion LatLonDocValuesField must implement (override) the stringValue method and return the decoded value.

       

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dsmiley David Smiley
            thomas.woeckinger Thomas Wöckinger
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Slack

                  Issue deployment