Good day all,
Given the below index:
How can get all roles that start with “eng”?
Some like the below SQL:
select distinct roles from someindex where roles like ‘eng%’
Is there a way in opensearch to get the above in DSL?
I tried match_phrase_prefix along with terms aggregation over the roles field but it returned both engineer and consultant. I even tried the SQL plugin and got the same result while I should logically be getting only engineer.
I understand that OpenSearch operates on a document level but I was wondering if there is a way to to apply a match kind of query on the aggregated result.
I appreciate your help.