Redisearch: Allow GROUPBY on tag fields

Created on 7 Sep 2018  路  5Comments  路  Source: RediSearch/RediSearch

See #477

aggregations enhancement no-issue-activity

Most helpful comment

Why does the documentation states GROUPBY works on tag fields (@country)?
https://oss.redislabs.com/redisearch/Aggregations.html#example_2_sort_visits_to_a_specific_url_by_day_and_country

Or am I misunderstanding something? If "split" and "load" is the only solution for now, it is maybe adviced to change the documentation. I just spend an afternoon figuring out why this wasn't working.

All 5 comments

The tl;dr version is that tag fields would need to be parsed on the fly. You could get away with a 'poor man tag field' with a combination of split and load. You'd just split on the same delimiter. Note that this might not actually work the same way, because the splitter in aggregations is not the same implementation as the splitter in the tag indexer. but... this is just the general concept.

If we were to implement this feature directly, it would need to be aware of the tag fields, and we would perhaps need to store the tag values as sortables of some sort.

Just a side remark: We sometimes define two versions of 1 field, where we need a TAG to be SORTABLE. That's a workaround of course, we didn't issue a feature request.

Why does the documentation states GROUPBY works on tag fields (@country)?
https://oss.redislabs.com/redisearch/Aggregations.html#example_2_sort_visits_to_a_specific_url_by_day_and_country

Or am I misunderstanding something? If "split" and "load" is the only solution for now, it is maybe adviced to change the documentation. I just spend an afternoon figuring out why this wasn't working.

@mnunberg @MeirShpilraien : can you get back at this please?
From the documentation I conclude that it is possible to use AGGREGATE & GROUP BY on tag fields. However this is not working as expected and therefor we are using the LOAD command. We feel like this is having a bad influence on the performance of our aggregate requests, so it would be great if there was a better solution for this.

Stale issue message

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arora-kushal picture arora-kushal  路  5Comments

botzill picture botzill  路  5Comments

tw-bert picture tw-bert  路  4Comments

tw-bert picture tw-bert  路  7Comments

lumina7 picture lumina7  路  6Comments