Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22222

Floating Point field with numeric range is mapped as a String

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.1
    • Fix Version/s: 10.10
    • Component/s: Elasticsearch

      Description

      Floating Point is defined as follows in Studio:

      <xs:element name="amount" nillable="false" nxsv:nillable="false">
         <xs:simpleType>
           <xs:restriction base="xs:double">
             <xs:minInclusive value="0"/>
           </xs:restriction>
         </xs:simpleType>
       </xs:element>
      

      Then Elasticsearch maps the field as a String:

         "bcsalescommon:amount" : {
            "type" : "string"
          },
      

      If I look into the values in Elasticsearch for a document, I can see that the value is stored as a String:

      curl -XGET localhost:9200/nuxeo/doc/8b3b9fb4-704a-46cb-b994-7beb45fd6bb1?pretty returns:

      {
        "_index" : "nuxeo",
        "_type" : "doc",
        "_id" : "8b3b9fb4-704a-46cb-b994-7beb45fd6bb1",
        "_version" : 1493124196503526,
        "found" : true,
        "_source" : {
        ...
          "bcsalescommon:amount" : "785.0",
          ...
        }
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h