0

elasticsearch float integer 数字排序没有效果

bblythe created at6 years ago view count: 2518

按价格排序

curl -XPOST localhost:9200/test/test/_search -d '{
    "sort": {
        "price": {
            "order": "desc"
        }
    },
    "query": {"match_all": {}}
}'
report
回复
0

使用unmapped_type指定下类型试试。

curl -XPOST localhost:9200/test/test/_search -d '{
    "sort": {
        "price": {
            "order": "desc",
            "unmapped_type": "float"
        }
    },
    "query": {"match_all": {}}
}'
6 years ago 回复

Recent search keywords