How to return fields in correct order for an ElasticSearch query -


i'm performing multimatch search against elasticsearch index, , want source object fields in same order stored in.

however, when response elasticsearch query, fields in alphabetical order (which not particularly useful i'm doing). i'm confident used behave desired way in previous version of es, since upgraded returning fields in alphabetical order.

edit: note if perform standard match_all search, fields in original order. wonder if has multimatch query?

edit 2: ok, ran again , returned fields in random order (not alphabetical). maybe bug in elasticsearch?

you cannot guarantee order in returned. source document plain old json object , by definition:

an object unordered set of name/value pairs.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -