Hi All, Does anyone have any experience in storing deep, hierarchical relationships in ES?
We are trying to model something along the lines of:
Food -> Fruit -> Green -> Apple Doc
Food -> Fruit -> Round -> Apple Doc
Food -> Healthy -> Apple Doc
Food -> Apple Doc
I want to be able to find the Apple (by some document attributes) but also know that it lives in 2 places (with the hierarchy returned) - ideally with references /snippets to the ancestor documents?
Each of the ancestors in the list are documents in their own rights and I would like to be able to search within any level and find Apple...
Its also worth noting that there are millions of items at each level... so flattening IDs etc is a last resort.
It doesn't give me a reference to the "parent" documents eg. Fruit..
It presents an ingest / management issue - that if the hierarchy changes (which it will and quite regularly), we may have to update millions of documents.
Categories are dynamic in that we would like to link them to documents that meet a set of query criteria / list of IDs.
We could manage 2 and 3 with some application logic and Percolator (I think)..?
You still have the update issue, but you can easily link to parent documents by performing the same query and using a filter ie. level2 = "Food/Fruit" for all fruit.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.