hi, Jan
Thank you for your help!
I use this mapping,now it can sorting and search at on the field.
...
"fields" : {
"fieldName" : {"type" : "string", "index" : "analyzed"},
"sortFieldName" : {"type" : "string", "index" : "not_analyzed"}
}
...
But for the Chinese, sorting as "not_analyzed" seams no significance
How to define the special sort analyzer , for example in phonetic.
2012/2/3 Jan Fiedler fiedler.jan@gmail.com
For correct, locale specific sorting you should create a separate field
for sorting purposes. This is best done via the multi-field mapping (
Elasticsearch Platform — Find real-time answers at scale | Elastic
).The sort field should use a special (sort) analyzer that performs
collation for Chinese. In simple terms, a collator takes your term and
calculates a sorting key (that does not resemble the term). Take a look at
the ICU plugin and its collators (
Elasticsearch Platform — Find real-time answers at scale | Elastic
)