Got it

Data fail to be written in the Elasticsearch node

Created: Jul 21, 2020 06:14:33Latest reply: Jul 27, 2020 10:47:30 249 5 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hello team,

If the type of data to be written is different from that of the existing data, will the data fail to be written in the Elasticsearch node?

Thank you.

Featured Answers
little_fish
Admin Created Jul 21, 2020 06:18:41

Dear Lucas,

When importing data, ensure that the data type in one index is the same. If the data type is different the error message "illegal_argument_exception, final mapping would have more than 1 type" may be displayed.

You can run required commands to check the mapping of the index, confirm the existing index type name, and check whether the type of the new data is the same as that of the existing type


curl -XGET --tlsv1.2 --negotiate -k  -u :  "https://ip:httpport/test_index/_mapping?pretty"

{

  "test_index" : {

    "mappings" : {

      "test_type1" : {

        "properties" : {

          "date" : {

            "type" : "date",

            "format" : "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis"

          },

          "text" : {

            "type" : "text",

            "fields" : {

              "keyword" : {

                "type" : "keyword",

                "ignore_above" : 256

              }

            }

          }

        }

      }

    }

  }

}


Thanks.


View more
  • x
  • convention:

Lucas_Zhao
Lucas_Zhao Created Jul 21, 2020 06:25:04 (0) (0)
 
All Answers
Hello, dear!
It's nice to meet you in the community.
We're working on your problem. Please be patient.
View more
  • x
  • convention:

Lucas_Zhao
Lucas_Zhao Created Jul 21, 2020 06:24:38 (0) (0)
Thanks.  

Dear Lucas,

When importing data, ensure that the data type in one index is the same. If the data type is different the error message "illegal_argument_exception, final mapping would have more than 1 type" may be displayed.

You can run required commands to check the mapping of the index, confirm the existing index type name, and check whether the type of the new data is the same as that of the existing type


curl -XGET --tlsv1.2 --negotiate -k  -u :  "https://ip:httpport/test_index/_mapping?pretty"

{

  "test_index" : {

    "mappings" : {

      "test_type1" : {

        "properties" : {

          "date" : {

            "type" : "date",

            "format" : "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis"

          },

          "text" : {

            "type" : "text",

            "fields" : {

              "keyword" : {

                "type" : "keyword",

                "ignore_above" : 256

              }

            }

          }

        }

      }

    }

  }

}


Thanks.


View more
  • x
  • convention:

Lucas_Zhao
Lucas_Zhao Created Jul 21, 2020 06:25:04 (0) (0)
 
Useful document, thanks
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.