Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning #45

Open
rijink7 opened this issue Jun 16, 2020 · 3 comments
Open

DeprecationWarning #45

rijink7 opened this issue Jun 16, 2020 · 3 comments

Comments

@rijink7
Copy link

rijink7 commented Jun 16, 2020

i received this warning :
ElasticsearchDeprecationWarning: [types removal] Specifying types in document index requests is deprecated, use the typeless endpoints instead (/{index}/_doc/{id}, /{index}/_doc, or /{index}/_create/{id}).
body=json.loads(line)

ElasticSearch version : 7.7.1
jsonpyes :1.4.2

@xros
Copy link
Owner

xros commented Jun 24, 2020

@rijink7 hi, what's the format of your data file? Please show some examples.

Does this warning affect your data importing? I think it's just a warning.

As it showed Specifying types in document index requests is deprecated jsonpyes uses --type flag to import data which was a previous standard in ElasticSearch.

@rijink7
Copy link
Author

rijink7 commented Jul 1, 2020

hi sorry for the late replay, the format is a usual JSON type
{
"userId" : "usr264867",
"name" : "Crazy",
"country" : "Trasslig",
"countryId" : "638374",
"thmUrl" : "ImgData/user_264867.jpg",
"bio" : [
"Becky and the Birds"
],
"books" : [],
"songs" : [],
"vStatus" : "created",
"infoSource" : "web",
"sortOrder" : 1.0
}
and the import was successful

@xros
Copy link
Owner

xros commented Jul 7, 2020

hi sorry for the late replay, the format is a usual JSON type
{
"userId" : "usr264867",
"name" : "Crazy",
"country" : "Trasslig",
"countryId" : "638374",
"thmUrl" : "ImgData/user_264867.jpg",
"bio" : [
"Becky and the Birds"
],
"books" : [],
"songs" : [],
"vStatus" : "created",
"infoSource" : "web",
"sortOrder" : 1.0
}
and the import was successful

As I can see, the format is valid json. It's only the latest ES7 changed its import URL routes. But the older flag --type will work fine. Just ignore it untill ElasticSearch removes this method. Not sure whether they will abandon it. But jsonpyes will still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants