S
S
stanlee2015-11-26 18:55:50
elasticsearch
stanlee, 2015-11-26 18:55:50

How to properly sort a selection in Elasticsearch?

There is a document with streets and house numbers

$properties = [
  'aoguid' => [
      'type' => 'string',
      'include_in_all' => false,
  ],
  'code' => [
      'type' => 'string',
      'include_in_all' => false,
  ],
  'street_name' => [
      'type' => 'string',
      'include_in_all' => true,
      'analyzer' => 'indexAnalyzer',
  ],
  'house_num' => [
      'type' => 'string',
      'include_in_all' => true,
  ],
  'aolevel' => [
      'type' => 'integer',
      'include_in_all' => false,
  ],
];

...
'street_name' => 'Гагарина',
'house_num' => 10
...

How to make it so that the selection is displayed taking into account sorting by the house number house_num?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question