Meaning dot/ dash at elasticsearch


(雪中的凤凰) #1

Hi Team,

POST news/bursa/_search{ "query": { "bool": { "must": [ { "multi_match": { "query": "0108.KL" , "fields": [  "stkno", "tag"  ,"content"  ,"htext"  ] , "operator": "or"  } } , { "range": { "CDate": {  "gt": "2014-04-01" ,  "lte": "2017-04-26T23:59:59"  } } }  ] } },  "from": 0, "size": 1000, "sort": [ { "CDate": { "order": "desc" } } ] }

My comment as above, when i search "0108.KL", the result not expected, it will find all result i don't want. If my query change to "0108" it can find the data i need.
Same also dash(-).

What the meaning of dot (.) and dash(-) at elasticsearch?


(Mark Walkom) #2

That would be because of analysis. What sort of field did you map it as?


(雪中的凤凰) #3

the pic above is using GET /news/bursa/_mapping..
is this you mean?


(Mark Walkom) #4

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.


(雪中的凤凰) #5

i already get the answer i need it already


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.