I have string field that mapped as 'not_analyzed'. Each string has '>' simbol and need to find some string with it.
string e.g)
one>two>tree>four>...
with below query, I could get result I expected.
"query": { "wildcard": { "activityseq": { "value": "one*" } } }
but when added '>' in value, It's not.
"query": { "wildcard": { "activityseq": { "value": "one>*" } } }
or
"query": { "wildcard": { "activityseq": { "value": "one>*" } } }
Any Idea of this?
document sample
{ "_index": "pm", "_type": "dmcase_00090", "_id": "AVQ7Wjht0bpb6L5Mykw7", "_version": 1, "_score": 1, "_source": { "endat": "1970-01-12T06:08:00+09:00", "startat": "1970-01-06T23:02:00+09:00", "activityseq": "MakeTicket>FirstContact>ArrangeSurvey>MakeTicket>InformClientSurvey>ArrangeSurvey>Survey>Survey>InternRepair>RepairReady>InternRepair>SendTicketToFinAdmin>TicketReady>ReadyInformClient", "events": [ { ... some events
query + result
1.
"query": { "wildcard": { "activityseq": { "value": "maketicket*" } } }
result : data as I expect
2.
"query": { "wildcard": { "activityseq": { "value": "maketicket>*" } } }
result
"hits": { "total": 0, "max_score": null, "hits": [] }
3.
"query": { "wildcard": { "activityseq.raw": { "value": "maketicket*" } } }
result
"hits": { "total": 0, "max_score": null, "hits": [] }
4.
"query": { "wildcard": { "activityseq": { "value": "maketicket>*" } } }
result
"caused_by": { "type": "json_parse_exception", "reason": "Unrecognized character escape '>' (code 62)\n at [Source: [B@61201912; line: 5, column: 37]" }
curl -XGET localhost:9200/your_index
(renameyour_index
to match your actual index name) ? – Val