A
A
Alexander2020-01-20 14:25:25
elasticsearch
Alexander, 2020-01-20 14:25:25

How to select all values ​​of one field in elasticsearch?

Tell me how to make an analog
select distinct title from my_index

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
chupasaurus, 2020-01-20
@Captain

Terms aggregation

I
Ivan Shumov, 2020-01-20
@inoise

Elastic is not a database, but a search index. But in general there are so-called aggregations

I
iva3682, 2020-05-02
@iva3682

use something like:

'aggs' => [
                    'unique_ids' => [
                        'terms' => [
                            'field' => 'CategoryID',
                        ]
                    ]
                ]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question