ElasticSearch: Design schema for hieararchy level data? -


for object have data in format

title, description, tag

e.g here mobile, tablet, real estate have tag heirachy this

electronics - > mobile -> samsung electronics - > mobile -> nokia electronics - > tablet -> samsung realestate - > rent -> villa 

now want query like

1. find "mobile" of brand "samsung" exist in "electronics" category 2. find "tablet" of brand "samsung" exist in "electronics" category 3. find "tablet" of brand "samsung" exist in "electronics" category 3. find "villa" "rent" exist in "realestate" category 

how can design es schema kind of hearahi level data?

this feels best case flat structure number of properties can query for.

{   "product": "mobile",   "brand": "samsung",   "category": "electronics",   "anotherproperty": "and on" } 

this basic approach let's queries need.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -