Using Nested Field like main data source

Hello everyone,

I'm developing a website which using elasticsearch for showing data on datatable with
fully supported features (paging,sorting, etc.) (you can see example data below, and easy to figure out thats a grocery application ).

amount:	596.5
cashAmount:	596.5
   	 dBInsertionDate:	"2019-12-30"
{ "productName":"apple","unit":4

In the begining I was getting my data with products and after customer clicking the row I was showing products of data.
Everything was awesome until my client wanted to see new grid table with only shows nested (inner products) data on the datatable ofcourse with all datatable feature (paging,filtering,orderin etc.), I could index all products on another index (new one) and use new index for new datatable but that looks like bad practice and lots of wasting storage.

I will try using inner_hits options, but I'm not sure I can implement that easily.

So I'm really need some advice to do that, cause looks like this will be extend after a month with more nested fields.

Thank you for your any advice :metal:

I search for it and looks like it's impossible to paging,sorting etc. in nested fields according to ES forum (topic) ( see also

Now I'm going to index all nested parts as different index.That will be more efficient for future.

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