Number format exception for a string


(venkata nagaraju buddarapu) #1

hi ,

am getting the below error in the response while doing bulk indexes and
defined the field as string using put mapping

error=NumberFormatException[For input string: "two"]

can some one help me why am getting this error

Bulk Index Request:

{ "index" : {"_type":"document","_id":"1"} }
{"customFields":{"numSort11":"1","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:08.5439655Z","dateSort31":"2015-05-10T04:47:08.5439655Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"1","rank":0.0,"dcn":"DCN1"}
{ "index" : {"_type":"document","_id":"2"} }
{"customFields":{"numSort11":"2","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:08.6338127Z","dateSort31":"2015-05-10T04:47:08.6338127Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"2","rank":0.0,"dcn":"DCN2"}
{ "index" : {"_type":"document","_id":"3"} }
{"customFields":{"numSort11":"3","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:08.7334259Z","dateSort31":"2015-05-10T04:47:08.7334259Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"3","rank":0.0,"dcn":"DCN3"}
{ "index" : {"_type":"document","_id":"4"} }
{"customFields":{"numSort11":"4","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:08.8252263Z","dateSort31":"2015-05-10T04:47:08.8252263Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"4","rank":0.0,"dcn":"DCN4"}
{ "index" : {"_type":"document","_id":"5"} }
{"customFields":{"numSort11":"5","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:08.9160501Z","dateSort31":"2015-05-10T04:47:08.9160501Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"5","rank":0.0,"dcn":"DCN5"}
{ "index" : {"_type":"document","_id":"6"} }
{"customFields":{"numSort11":"6","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:09.0058973Z","dateSort31":"2015-05-10T04:47:09.0058973Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"6","rank":0.0,"dcn":"DCN6"}
{ "index" : {"_type":"document","_id":"7"} }
{"customFields":{"numSort11":"7","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:09.0967211Z","dateSort31":"2015-05-10T04:47:09.0967211Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"7","rank":0.0,"dcn":"DCN7"}
{ "index" : {"_type":"document","_id":"8"} }
{"customFields":{"numSort11":"8","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:09.1894981Z","dateSort31":"2015-05-10T04:47:09.1894981Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"8","rank":0.0,"dcn":"DCN8"}
{ "index" : {"_type":"document","_id":"9"} }
{"customFields":{"numSort11":"9","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:09.2793453Z","dateSort31":"2015-05-10T04:47:09.2793453Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"9","rank":0.0,"dcn":"DCN9"}
{ "index" : {"_type":"document","_id":"10"} }
{"customFields":{"numSort11":"10","numSort21":24866,"numSort31":11074,"numSort41":24866,"author2":"two","author3":"four
five","author4":"six
seven","dateSort21":"2015-05-12T04:47:09.3721223Z","dateSort31":"2015-05-10T04:47:09.3721223Z","doubleSort11":18.0,"doubleSort21":67884.18,"doubleSort31":54262.600000000006,"author1":54262.600000000006},"id":"10","rank":0.0,"dcn":"DCN10"}

Index field mapping :

"mappings": {

  • "document": {
    • "dynamic": "strict",
    • "date_detection": false,
    • "properties": {
      • "id": {
        • "type": "long"
          },
      • "title": {
        • "type": "string"
          },
      • "text": {
        • "type": "string"
          },
      • "rank": {
        • "type": "float"
          },
      • "customFields": {
        • "properties": {
          • "numSort31": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "type": "double"
              },
          • "numSort21": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "type": "double"
              },
          • "doubleSort11": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "type": "double"
              },
          • "numSort41": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "type": "double"
              },
          • "doubleSort21": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "type": "double"
              },
          • "numSort11": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "type": "double"
              },
          • "doubleSort31": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "type": "double"
              },
          • "doubleSort41": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "type": "double"
              },
          • "author4": {
            • "index_name": "cfm037",
            • "type": "string",
            • "fields": {
              • "author4_na": {
                • "index_name": "cfm037",
                • "index": "not_analyzed",
                • "type": "string"
                  }
                  }
                  },
          • "author3": {
            • "index_name": "cfm037",
            • "type": "string",
            • "fields": {
              • "author3_na": {
                • "index_name": "cfm037",
                • "index": "not_analyzed",
                • "type": "string"
                  }
                  }
                  },
          • "author5": {
            • "index_name": "cfm037",
            • "type": "string",
            • "fields": {
              • "author5_na": {
                • "index_name": "cfm037",
                • "index": "not_analyzed",
                • "type": "string"
                  }
                  }
                  },
          • "dateSort11": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "format": "dateOptionalTime",
            • "type": "date"
              },
          • "author2": {
            • "index_name": "cfm037",
            • "type": "string",
            • "fields": {
              • "author2_na": {
                • "index_name": "cfm037",
                • "index": "not_analyzed",
                • "type": "string"
                  }
                  }
                  },
          • "dateSort41": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "format": "dateOptionalTime",
            • "type": "date"
              },
          • "author1": {
            • "index_name": "cfm037",
            • "type": "string",
            • "fields": {
              • "author1_na": {
                • "index_name": "cfm037",
                • "index": "not_analyzed",
                • "type": "string"
                  }
                  }
                  },
          • "dateSort31": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "format": "dateOptionalTime",
            • "type": "date"
              },
          • "dateSort21": {
            • "index_name": "cfm037",
            • "index": "analyzed",
            • "format": "dateOptionalTime",
            • "type": "date"
              }
              }
              },
      • }

iInde

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/29b282b1-5415-41ff-aeac-843706d28f5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2