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 8985741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:23:31+00:00 2026-06-15T21:23:31+00:00

Collection: years Entry 1 { _id: ObjectId(4f2fd2ee4516ed6ceebbe17c), shows: [ { day: 1, hasVideos: false,

  • 0

Collection: years

Entry 1

{
  _id: ObjectId("4f2fd2ee4516ed6ceebbe17c"),
  shows: [
    {
      day: 1,
      hasVideos: false,
      month: 1,
      showid: 1252187000,
      venue: "Someplace"
    },
    {
      day: 2,
      hasVideos: false,
      month: 2,
      showid: 1252188010,
      venue: "Philly"
    }
  ],
  year: 1988
}

Entry 2

{
  _id: ObjectId("4f2fd2ee4516ed6ceebbe17c"),
  shows: [
    {
      day: 19,
      hasVideos: false,
      month: 1,
      showid: 1252187999,
      venue: "Hunt's"
    },
    {
      day: 21,
      hasVideos: false,
      month: 1,
      showid: 1252188030,
      venue: "Hunt's"
    }
  ],
  year: 1987
}

Now, I created a set called years in my redis store. This is populated with strings in the form of year:1988. I created a hash called year:1988. But this is wrong. I want to nest an array of these show hashes.

How can nest a hash two sets deep? Should I just continue the pattern and create a set in the form of 1988:01:01 and 1988:02:02 to store the first entry?

Thanks

  • 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-15T21:23:32+00:00Added an answer on June 15, 2026 at 9:23 pm

    If you only want to be able to query by date (or year) you should use a Sorted Set as lookup.

    Sorted Sets on redis.io

    What you want to do is use the show’s Id or the serialized show as the member and the date the show aired, or took place as the score.

    Note that if you only store the shows Id you need to perform another lookup to get the shows’ details.

    Now you can perform range queries which seems to be what you want:

    ZRANGEBYSCORE

    ZREVRANGEBYSCORE

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

Sidebar

Related Questions

I have a collection in mongoDb. it is similar to the following. array( '_id'
I have a collection that represents the population (M, F) for each years of
Collection.clear() will delete children whenever Session flushes. What about OneToOne? Setting to null is
Garbage collection identify the objects that are no longer referred to by any variable
Garbage Collection can become a time consuming process. In this regard, the GC tends
My collection.fetch doesn't work and doesn't get the models to be rendered. I have
We have a collection of entities of type called Unit , collection of entities
I have a collection that use as a cache. How can I limit the
I have a collection of items populated to a drop down menu: string myUserName
I have a collection of Objective-C classes that get sub-classed at a variety of

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.