I have an index with several TAGs on it which I am able to return just fine using FIRST_VALUE and the GROUPBY clause, however when using FT.AGGREGATE without GROUPBY and APPLY I get an error: “Value was not found in result (not a hard error)”. What would be the reason these TAGs are returned while grouping, but not otherwise? I cannot use FT.SEARCH when not grouping as I need to be able to sort by multiple fields.

LOAD works, however the documentation recommends not to use LOAD for performance reasons, so I am wondering what would be best to do in this case:

  1. Change the tag to sortable
  2. Retrieve the result set without the tags, and execute HGET to retrieve the rest of the data?


The reason is that they aren’t SORTABLE. They’ll need to be SORTABLE, or else you’ll have to LOAD them, as you discovered. The tradeoff here is speed vs. memory: making the fields SORTABLE means your index will be bigger, while using LOAD does not keep as much data in the index but means that your aggregate queries must load the data in.