Mapping & Analyzer
mapping
mapping params
- geo_point
- string “lat,lng”
- object {lat: “”, lon: “”}
- geohash
- array [lng, lat]
- “POINT(lon lat)”
analyzer
-
standard
-
simple
- breaks text into tokens at any non-letter character, such as numbers, spaces, hyphens and apostrophes
- discards non-letter characters
- change uppercase to lowercase
-
whitespace
-
stop
-
keyword
- the
keyword
analyzer is a “noop” analyzer which returns the entire input string as a single token
- the
-
pattern
-
language
- arabic, armenian, basque, bengali, brazilian, bulgarian, catalan, cjk, czech, danish, dutch, english, estonian, finnish, french, galician, german, greek, hindi, hungarian, indonesian, irish, italian, latvian, lithuanian, norwegian, persian, portuguese, romanian, russian, sorani, spanish, swedish, turkish, thai
-
fingerprint
- remove leading and trailing whitespace
- change all characters to their lowercase representation
- remove all punctuation and control characters
- normalize extended western characters to their ASCII representations (for example “gôdel” -> “godel”)
- split the string into whitespace-separated tokens
- sort the tokens and remove duplicates
- join the tokens back together
-
n-gram
- change all characters to their lowercase representation
- remove all punctuation, whitespace, and control characters
- obtain all the string n-grams
- sort the n-grams and remove duplicates
- join the sorted n-grams back together
- normalize extended western characters to their ASCII representation
-
custom
- character filter
- tokenizer
- token filters
Chinese analyzer
- syntax
GET _analyze
{
"analyzer": "icu_analyzer",
"text": "淮海中路"
}
GET _analyze
{
"analyzer": "smartcn",
"text": "淮海中路"
}
GET _analyze
{
"analyzer": "aliws",
"text": "淮海中路"
}
GET _analyze
{
"analyzer": "ik_smart",
"text": "淮海中路"
}
icu_analyzer
> 上海, 城区
> 澳门, 特别, 行政, 区
> 淮海, 中路
> 新, 锦, 江, 大, 酒店
> 南京, 长江, 大, 桥
> 巴, 音, 郭, 楞, 蒙古, 自治州
smartcn
> 上海, 城区
> 澳门, 特别, 行政区
> 淮海, 中, 路
> 新, 锦江, 大酒店
> 南京, 长江, 大桥
> 巴音郭楞, 蒙古, 自治州
aliws
> 淮海, 中路
> 新, 锦江, 大, 酒店
> 南京, 长江, 大桥
ik_smart
> 淮海中路
> 新锦江, 大酒店
> 南京长江大桥