1

I'm learning Elasticsearch and Postman. I've set up Elasticsearch and it's up and running at my localhost:9200. I'm following the tutorial on Elasticsearch with Postman.

enter image description here

I put the object in the body as JSON enter image description here

And I'm getting the following error.

enter image description here

6
  • 1
    you have to put them into the body, chosing JSON as contenttype. Also you have to make sure it is valid json. Commented Apr 9, 2019 at 6:05
  • @aHochstein thanks~ I did both, and I got this error message. Could you take a look? I will edit my question Commented Apr 9, 2019 at 6:10
  • 1
    have a look at your apostrophes they look kinda strange in your example json, it should look like this: "property" : "value" Commented Apr 9, 2019 at 6:12
  • @aHochstein I switched that as well. Commented Apr 9, 2019 at 6:13
  • 1
    you are reaching your elasticsearch now, what u see is an server error. Have a look at the tutorial :) Commented Apr 9, 2019 at 6:15

1 Answer 1

1

Type "string" is not used anymore, so I changed that to "text"

"type": "text" This seems to work. When I invoke a GET request localhost:9200/team/_mapping I get the results fine.

However, it says

types are being removed from Elasticsearch in 7.0, the mappings element will no longer return the type name as a top-level key by default.

I am really new,(started to learn elasticsearch today) so I do not know in detail.

Sign up to request clarification or add additional context in comments.

2 Comments

yes exactly concerning the type warning, it refers to type member that you are specifying in you URL. From what I've seen the recommended way to provide explicit mapping is by doing PUT to localhost:9200/team with a json body {"mappings":{ "properties":{ "id": {"type":"text"}, [...] }}
@A.J Alhorr I think you are right. Thank you for your clarification. I need to review the stuff agian. over the weekend, I forgot most of it again. lol

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.