Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8257411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:11:20+00:00 2026-06-08T02:11:20+00:00

Im using redis to store tags for certain entities. Examples of the data: +————-+——————————–+

  • 0

Im using redis to store tags for certain entities. Examples of the data:

+-------------+--------------------------------+
|     key     |             value              |
+-------------+--------------------------------+
| book:1:tags |     [python, ruby, rails]      |
+-------------+--------------------------------+
| book:2:tags |     [fiction, fantasy]         |
+-------------+--------------------------------+
| book:3:tags |     [fiction, adventure]       |
+-------------+--------------------------------+

How do I find all books with a particular tag, ie all books tagged with fiction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:11:21+00:00Added an answer on June 8, 2026 at 2:11 am

    You have to maintain reverse indexes yourself. Along with those keys that you posted, you should create reverse references.

    tag:python => [1]
    tag:ruby => [1]
    tag:rails => [1]
    
    tag:fiction => [2, 3]
    tag:fantasy => [2]
    tag:adventure => [3]
    

    Then it’s trivial to do what you want. But maybe you should consider using another tool for the job. For example, MongoDB can efficiently index and query arrays.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm thinking about using Redis as a store for some highly transient data (we're
Redis (a key-value store) supports lua scripts - it executes the script on the
I'm looking to store time-based counters using Redis, in a Python project. I want
I'm using rails 3.2 and Ruby 1.9.3 I have a need to store data
I am using Redis database where we store the navigational information. These data must
I'm using nodejs with connect-redis to store the session data. I'm saving user data
I'm currently using Socket.IO with redis store. And I'm using Room feature with it.
We're using a Ruby web-app with Redis server for caching. Is there a point
I am using Redis to store two databases : 0 and 1 via the
I am interested to know the performance impacts of using MySQL as a key-value

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.