I have 2 different types in my index, product and product category. A
product can have many categories so I'm storing an array of category ids in
the product.
If when searching for a product on it's fields (say description,
manufacturer etc) how would I also search on the assigned category
descriptions? Is this even possible?
You can have a look at parent child or nested features.
But, i'm not a great fan of it.
If you can, I recommand to store in your product type all what you know about the product category. IMHO, It will duplicates data but will give the best response time.
So, don't store ids but directly contents.
If it doesn't fit to your use case, try nested or parent/child.
HTH
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
I have 2 different types in my index, product and product category. A product can have many categories so I'm storing an array of category ids in the product.
If when searching for a product on it's fields (say description, manufacturer etc) how would I also search on the assigned category descriptions? Is this even possible?
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.