performance trade-off when using tags

Hi redisearch team,

I am using redisearch to index items for sale - my indexes hold ~N million items, and each item has around 10 tags from a total pool of ~1000 tags.

I am trying to figure out a way to add items in the index that are not yet “live” - yet I can see them in my admin / special UIs using the same queries/filters as for everything else. These items are less than 1% of the total.

My question is - what is the best way to implement this in terms of performance - and maybe other query syntax gotchas:

  1. have a “live” tag - so all search requests contain tag:live

  2. have a “blocked” tag - so all search requests contain !tag:blocked

  3. don’t use tags - have a separate index

Thanks for making redisearch!

Michael

I would choose (2) because it’s more space efficient, and furthermore, it’s easier to check if a specific ID is not present within an index, rather than doing the opposite (but realistically speaking, should be about the same). The biggest boost in performance comes from the reduced index size.

Mark Nunberg | Senior Software Engineer
Redis Labs - home of Redis

Email: mark@redislabs.com