Filtering with elasticsearch

Hello

I try to do something strange and to be franc I have no idea how to query it.
Basically I want to filter an array by checking if values are in ES and conserving the order...

For instance : array = [123, 832, 108, 431]
if ES has keys 431 and 832
I want to return [ 832, 431]

I know that it is not what ES is made for... But It is what I'd like to do :slight_smile:

Any idea ?

I'm not sure if there is anything in elasticsearch that will give you exactly that.
However, if you go via the regular query/filter route, highlights object will give you what matches. You may programatically transform it into whatever form you need it in.

Thx... Indeed I was expecting for something simplier :slight_smile:
If I didn't find, I will do it on code side...

Regards

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.