Hi guys,
I have a problem with search by field which contain "@" (email field).
---create a new entity---
POST http://ua1-2003-pc.gtech.local:9200/idx2/create HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==
User-Agent: Telerik Test Studio for APIs
Host: ua1-2003-pc.gtech.local:9200
Content-Length: 121
Expect: 100-continue
Connection: Keep-Alive
{
"id": 541706163,
"message": "messaaage",
"email": "test@gmail.com",
"state": "staaate",
"count": 541706163
}
--- get response ---
HTTP/1.1 201 Created
Content-Length: 158
Content-Type: application/json; charset=UTF-8
Location: /idx2/create/AV2eb15oXF93XOTI570L
{"_index":"idx2","_type":"create","_id":"AV2eb15oXF93XOTI570L","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"created":true}
--- try to search ---
POST http://ua1-2003-pc.gtech.local:9200/idx2/_search HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==
User-Agent: Telerik Test Studio for APIs
Host: ua1-2003-pc.gtech.local:9200
Content-Length: 133
Expect: 100-continue
Connection: Keep-Alive
{
"query": {
"bool": {
"filter": {
"prefix": {
"email": {
"value": "test"
}
}
}
}
}
}
--- get response ---
HTTP/1.1 200 OK
Content-Length: 329
Content-Type: application/json; charset=UTF-8
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.0,"hits":[{"_index":"idx2","_type":"create","_id":"AV2eb15oXF93XOTI570L","_score":0.0,"_source":{
"id": 541706163,
"message": "messaaage",
"email": "test@gmail.com",
"state": "staaate",
"count": 541706163
}}]}}
but in case when I try use "value": "test@gmail.com"
or "value": "test@" I get hits.total 0