Requests via Sense chrome extension to elasticsearch breaks when ID contains @

1.7k views Asked by At

Trying to add documents to an elasticsearch index using Sense. eg:

POST productmarket/ppt/[email protected]_Index_withNewGuid_233df4
{
 "hash" : "cake"   
}

and I get back"

Request failed to get to the server (status code: 0):

Now if I change the @ to something else it works fine.

Now we already have items in the index that have @'s in the id's. If I update them in a frontend APP we have that uses the API's to post it breaks as well eg.

enter image description here

BUT When I use our C# app to index a json document that has @ in its id using NEST it works. And when I try and update this document again in the frontend app (where it just broke) it works as well.

Now I have tried indexing plain document and complex documents. Nothing changes. I've tried different indexes. Still the same problem.

Any idea what is wrong?

1

There are 1 answers

0
Shaun Groenewald On BEST ANSWER

Figured it out. Pretty stupid.

Nest URL encodes the request. Sense does not. Using the URL encoded value for @ it works fine.