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' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -