Skip to content

Why ScriptDocValues.Doubles is sorted ? #29110

@HorsonLiu

Description

@HorsonLiu

mappping:
{ "settings" : { "index" : { "number_of_shards" : 1, "number_of_replicas" : 0 } }, "mappings": { "obj_type": { "properties": { "feature_value": { "type": "double" }, } } } }

doc:
{"feature_value":[0.5, 0.1, 0.3]}

In self-defined SearchScript, I use ((ScriptDocValues<List>) getDoc().get(field)).get(0) returns 0.1 , but not 0.5. Why ? How can I retrieve the original double array, e.g. [0.5, 0.1, 0.3], not [0.1, 0.3, 0.5] ?
Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions