Hi all,
I have an index with three fields: Product, Brand and Attributes (Product and Brand are type TEXT and Attributes is type TAG).
+----------------------------------------------+
| INDEX |
+----------------------------------------------+
+----------------------------------------------+
| Product | Brand | Attributes |
+----------------------------------------------+
+----------------------------------------------+
| pencil | standler | 01, 04, 05 |
+----------------------------------------------+
| pen | bic | 02, 03 |
+----------------------------------------------+
| eraser | uniball | 02, 09 |
+----------------------------------------------+
| ... | ... | ... |
+----------------------------------------------+
I also have a HASH with Codes and its Description.
+--------------------------------+
| HASH |
+--------------------------------+
+--------------------------------+
| Codes | Description |
+--------------------------------+
+--------------------------------+
| 01 | Blue Ink |
+--------------------------------+
| 02 | Plastic |
+--------------------------------+
| 03 | Rubber |
+--------------------------------+
| ... | ... |
+--------------------------------+
I want to be able to use FT.AGGREGATE on the index and return for example:
> "Attributes"
> "02"
> "Attributes_desc"
> "Plastic"
> "Count"
> "2"
In other words, I would like to know how to link the values within Attributes to the values of Codes to reach the Description in the FT.AGGREGATE sentence.
Any help is appreciated.
Thank you.