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
cashierName:"NURY"
creditAmount:0
currencyAmount:0
dBInsertionDate: "2019-12-30"
"products":[
{ "productName":"apple","unit":4
},{
"productName":"orange","unit":2
}
]
}
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
Edit:
I search for it and looks like it's impossible to paging,sorting etc. in nested fields according to ES forum (topic) ( see also
Edit2:
Now I'm going to index all nested parts as different index.That will be more efficient for future.