redis-developer / redis-hacker-news-demo

The demo is a Hacker News clone and uses RedisJSON for storing the data and RediSearch for searching.
MIT License
15 stars 10 forks source link

Unable to seed data #1

Open spurin opened 3 years ago

spurin commented 3 years ago

Hi @ITsolution-git

Very interesting project. I've been trying to use this based on the readme and seem to experience problems with the data seed.

I'm running Redis with RedisSearch and ReJSON via the redismod docker container -

+ docker run --rm -p 6379:6379 -v redis.conf:/usr/local/etc/redis/redis.conf redislabs/redismod /usr/local/etc/redis/redis.conf
1:C 24 Mar 2021 11:58:12.011 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 24 Mar 2021 11:58:12.012 # Redis version=6.0.1, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 24 Mar 2021 11:58:12.012 # Configuration loaded
1:M 24 Mar 2021 11:58:12.014 * Running mode=standalone, port=6379.
1:M 24 Mar 2021 11:58:12.014 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 24 Mar 2021 11:58:12.014 # Server initialized
1:M 24 Mar 2021 11:58:12.014 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
1:M 24 Mar 2021 11:58:12.015 # <ReJSON> JSON data type for Redis v1.0.7 [encver 0]
1:M 24 Mar 2021 11:58:12.015 * Module 'ReJSON' loaded from /usr/lib/redis/modules/rejson.so
1:M 24 Mar 2021 11:58:12.016 * <search> Redis version found by RedisSearch : 6.0.1 - oss
1:M 24 Mar 2021 11:58:12.016 * <search> RediSearch version 2.0.6 (Git=v2.0.4-55-gb0db8b2e)
1:M 24 Mar 2021 11:58:12.016 * <search> Low level api version 1 initialized successfully
1:M 24 Mar 2021 11:58:12.016 * <search> concurrent writes: OFF, gc: ON, prefix min length: 2, prefix max expansions: 200, query timeout (ms): 500, timeout policy: return, cursor read size: 1000, cursor max idle (ms): 300000, max doctable size: 1000000, max number of search results:  1000000, search pool size: 20, index pool size: 8,
1:M 24 Mar 2021 11:58:12.016 * <search> Initialized thread pool!
1:M 24 Mar 2021 11:58:12.016 * Module 'search' loaded from /usr/lib/redis/modules/redisearch.so
1:M 24 Mar 2021 11:58:12.017 * Ready to accept connections

My .env file is as follows -

MAILGUN_API_KEY=YOUR_VALUE_HERE
SEARCH_REDIS_SERVER_URL=redis://172.17.0.2:6379
SEARCH_REDIS_PASSWORD=foobared
JSON_REDIS_SERVER_URL=redis://172.17.0.2:6379
JSON_REDIS_PASSWORD=foobared
LOG_LEVEL=1
PRODUCTION_WEBSITE_URL=

I'm then trying to start up the app through a simple docker container that I plan on refactoring later -

FROM node:15

RUN git clone https://github.com/redis-developer/redis-hacker-news-demo.git

WORKDIR "/redis-hacker-news-demo"

RUN npm install
RUN npm run build

CMD npm start
EXPOSE 5000

COPY .env /redis-hacker-news-demo

On startup I get the following -

docker run --rm -p 5000:5000 hackernews:latest

> hacker-news-clone-using-redis@0.10.0 start
> NODE_ENV=production node index.js

Loaded env from /redis-hacker-news-demo/.env
(node:21) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
REDIS Creating index of user - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user
REDIS Creating index of item - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:item
REDIS Creating index of user-vote - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user-vote
REDIS Creating index of user-favorite - [object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user-favorite
REDIS Creating index of user-hidden - [object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user-hidden
REDIS Creating index of comment - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:comment
REDIS Creating index of moderation-log - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:moderation-log
Server ready on http://localhost:5000
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  FT.DROPINDEX idx:user
REDIS REDIS RUN -  FT.DROPINDEX idx:item
REDIS REDIS RUN -  FT.DROPINDEX idx:user-vote
REDIS REDIS RUN -  FT.DROPINDEX idx:user-favorite
REDIS REDIS RUN -  FT.DROPINDEX idx:user-hidden
REDIS REDIS RUN -  FT.DROPINDEX idx:comment
REDIS REDIS RUN -  FT.DROPINDEX idx:moderation-log
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RUN -  FT.CREATE idx:user ON hash PREFIX 1 user: SCHEMA username TEXT SORTABLE email TEXT SORTABLE created NUMERIC SORTABLE karma NUMERIC SORTABLE about TEXT showDead TEXT isModerator TEXT shadowBanned TEXT banned TEXT _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:item ON hash PREFIX 1 item: SCHEMA id TEXT SORTABLE by TEXT SORTABLE title TEXT SORTABLE type TEXT SORTABLE url TEXT SORTABLE domain TEXT SORTABLE text TEXT SORTABLE points NUMERIC SORTABLE score NUMERIC SORTABLE created NUMERIC SORTABLE dead TEXT _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:user-vote ON hash PREFIX 1 user-vote: SCHEMA username TEXT SORTABLE type TEXT SORTABLE id TEXT SORTABLE parentItemId TEXT SORTABLE upvote TEXT SORTABLE downvote TEXT SORTABLE date NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:user-favorite ON hash PREFIX 1 user-favorite: SCHEMA username TEXT SORTABLE type TEXT SORTABLE id TEXT SORTABLE date NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:user-hidden ON hash PREFIX 1 user-hidden: SCHEMA username TEXT SORTABLE id TEXT SORTABLE date NUMERIC SORTABLE itemCreationDate NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:comment ON hash PREFIX 1 comment: SCHEMA id TEXT by TEXT parentItemId TEXT parentItemTitle TEXT SORTABLE isParent TEXT parentCommentId TEXT text TEXT points NUMERIC SORTABLE created NUMERIC SORTABLE dead TEXT _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:moderation-log ON hash PREFIX 1 moderation-log: SCHEMA moderatorUsername TEXT SORTABLE actionType TEXT SORTABLE username TEXT SORTABLE itemId TEXT SORTABLE itemTitle TEXT SORTABLE itemBy TEXT SORTABLE commentId TEXT SORTABLE commentBy TEXT SORTABLE created NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"

If I browse to localhost:5000 at this stage, I see -

image

If I try and load the seed data, I get the following with WRONGTYPE for all of the attempts -

root@7749cdc42c1e:/redis-hacker-news-demo# node ./backend/scripts/seed.js
REDIS REDIS RUN -  FLUSHALL
REDIS REDIS RESULT -  "OK"
REDIS REDIS RUN -  FLUSHALL
REDIS REDIS RESULT -  "OK"
REDIS Creating index of user - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user
REDIS Creating index of user-favorite - [object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user-favorite
REDIS Creating index of user-hidden - [object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user-hidden
REDIS Creating index of user-vote - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user-vote
REDIS Creating index of moderation-log - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:moderation-log
REDIS Creating index of item - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:item
REDIS Creating index of comment - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:comment
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  FT.DROPINDEX idx:user
REDIS REDIS RUN -  FT.DROPINDEX idx:user-favorite
REDIS REDIS RUN -  FT.DROPINDEX idx:user-hidden
REDIS REDIS RUN -  FT.DROPINDEX idx:user-vote
REDIS REDIS RUN -  FT.DROPINDEX idx:moderation-log
REDIS REDIS RUN -  FT.DROPINDEX idx:item
REDIS REDIS RUN -  FT.DROPINDEX idx:comment
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RUN -  FT.CREATE idx:user ON hash PREFIX 1 user: SCHEMA username TEXT SORTABLE email TEXT SORTABLE created NUMERIC SORTABLE karma NUMERIC SORTABLE about TEXT showDead TEXT isModerator TEXT shadowBanned TEXT banned TEXT _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:user-favorite ON hash PREFIX 1 user-favorite: SCHEMA username TEXT SORTABLE type TEXT SORTABLE id TEXT SORTABLE date NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:user-hidden ON hash PREFIX 1 user-hidden: SCHEMA username TEXT SORTABLE id TEXT SORTABLE date NUMERIC SORTABLE itemCreationDate NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:user-vote ON hash PREFIX 1 user-vote: SCHEMA username TEXT SORTABLE type TEXT SORTABLE id TEXT SORTABLE parentItemId TEXT SORTABLE upvote TEXT SORTABLE downvote TEXT SORTABLE date NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:moderation-log ON hash PREFIX 1 moderation-log: SCHEMA moderatorUsername TEXT SORTABLE actionType TEXT SORTABLE username TEXT SORTABLE itemId TEXT SORTABLE itemTitle TEXT SORTABLE itemBy TEXT SORTABLE commentId TEXT SORTABLE commentBy TEXT SORTABLE created NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:item ON hash PREFIX 1 item: SCHEMA id TEXT SORTABLE by TEXT SORTABLE title TEXT SORTABLE type TEXT SORTABLE url TEXT SORTABLE domain TEXT SORTABLE text TEXT SORTABLE points NUMERIC SORTABLE score NUMERIC SORTABLE created NUMERIC SORTABLE dead TEXT _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:comment ON hash PREFIX 1 comment: SCHEMA id TEXT by TEXT parentItemId TEXT parentItemTitle TEXT SORTABLE isParent TEXT parentCommentId TEXT text TEXT points NUMERIC SORTABLE created NUMERIC SORTABLE dead TEXT _id TEXT SORTABLE
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"ruaraidh") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  1
REDIS REDIS RUN -  HSET user:1 username ruaraidh email  created 1401987995 karma 489 about  showDead false isModerator false shadowBanned false banned false _id 1
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:1 . '{"username":"ruaraidh","password":"$2a$10$WuFn6GQ.tCM373R6FC.4J.zSG4st5gCbXSxhO0k5jXk7g1HHlJVzq","email":"","created":1401987995,"karma":489,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":1}'
REDIS ReplyError: WRONGTYPE Operation against a key holding the wrong kind of value
    at parseError (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:302:14) {
  command: 'JSON.SET',
  args: [
    'user:1',
    '.',
    '{"username":"ruaraidh","password":"$2a$10$WuFn6GQ.tCM373R6FC.4J.zSG4st5gCbXSxhO0k5jXk7g1HHlJVzq","email":"","created":1401987995,"karma":489,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":1}'
  ],
  code: 'WRONGTYPE'
}
REDIS REDIS RUN -  GET item:id-indicator
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  INCR item:id-indicator
REDIS REDIS RESULT -  1
REDIS REDIS RUN -  HSET item:1 id R4cdBL00W4Dp by ruaraidh title Why the Wuhan lab leak theory shouldn't be dismissed type news url https://eu.usatoday.com/in-depth/opinion/2021/03/22/why-covid-lab-leak-theory-wuhan-shouldnt-dismissed-column/4765985001/ domain usatoday.com points 1 score 1125 created 1616419661 dead false _id 1
REDIS REDIS RESULT -  11
REDIS REDIS RUN -  JSON.SET item:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET item:1 . '{"id":"R4cdBL00W4Dp","by":"ruaraidh","title":"Why the Wuhan lab leak theory shouldn't be dismissed","type":"news","url":"https://eu.usatoday.com/in-depth/opinion/2021/03/22/why-covid-lab-leak-theory-wuhan-shouldnt-dismissed-column/4765985001/","domain":"usatoday.com","points":1,"score":1125,"commentCount":0,"created":1616419661,"dead":false,"_id":1}'
REDIS ReplyError: WRONGTYPE Operation against a key holding the wrong kind of value
    at parseError (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:302:14) {
  command: 'JSON.SET',
  args: [
    'item:1',
    '.',
    `{"id":"R4cdBL00W4Dp","by":"ruaraidh","title":"Why the Wuhan lab leak theory shouldn't be dismissed","type":"news","url":"https://eu.usatoday.com/in-depth/opinion/2021/03/22/why-covid-lab-leak-theory-wuhan-shouldnt-dismissed-column/4765985001/","domain":"usatoday.com","points":1,"score":1125,"commentCount":0,"created":1616419661,"dead":false,"_id":1}`
  ],
  code: 'WRONGTYPE'
}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"gregwebs") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "1"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  2
REDIS REDIS RUN -  HSET user:1 username gregwebs email  created 1179267686 karma 2320 about  showDead false isModerator false shadowBanned false banned false _id 1
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET user:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:1 . '{"username":"gregwebs","password":"$2a$10$oetziEmy8mxt6jf.uK9G5Ol2N7VavWNNPHtU6c9/nDAVZLiaER9lm","email":"","created":1179267686,"karma":2320,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":1}'
REDIS ReplyError: WRONGTYPE Operation against a key holding the wrong kind of value
    at parseError (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:302:14) {
  command: 'JSON.SET',
  args: [
    'user:1',
    '.',
    '{"username":"gregwebs","password":"$2a$10$oetziEmy8mxt6jf.uK9G5Ol2N7VavWNNPHtU6c9/nDAVZLiaER9lm","email":"","created":1179267686,"karma":2320,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":1}'
  ],
  code: 'WRONGTYPE'
}
REDIS REDIS RUN -  GET comment:id-indicator
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  INCR comment:id-indicator
REDIS REDIS RESULT -  1
REDIS REDIS RUN -  HSET comment:1 id DMBEoWbaa0WZ by gregwebs parentItemId R4cdBL00W4Dp parentItemTitle Why the Wuhan lab leak theory shouldn't be dismissed isParent true parentCommentId  text This is a great article explaining why a lab leak should always be a suspect. The alternative theory is that a virus traveled on its own (via bats or other animals) from bat caves 900km away to Wuhan where there are 2 labs researching bats. One of the labs is lesser known but is right next to the seafood market and the hospital where the outbreak was first known. [1]<p>This article points out that a lab outbreak could have happened in the United States and many places in the world. We need to avoid demonizing China over this if we want to ever find out the truth and learn how to prevent another pandemic outbreak.<p>[1] <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.researchgate.net&#x2F;publication&#x2F;339070128_The_possible_origins_of_2019-nCoV_coronavirus" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.resea...</a> points 1 created 1616450455 dead false _id 1
REDIS REDIS RESULT -  11
REDIS REDIS RUN -  JSON.SET comment:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:1 . '{"id":"DMBEoWbaa0WZ","by":"gregwebs","parentItemId":"R4cdBL00W4Dp","parentItemTitle":"Why the Wuhan lab leak theory shouldn't be dismissed","isParent":true,"parentCommentId":"","children":[],"text":"This is a great article explaining why a lab leak should always be a suspect. The alternative theory is that a virus traveled on its own (via bats or other animals) from bat caves 900km away to Wuhan where there are 2 labs researching bats. One of the labs is lesser known but is right next to the seafood market and the hospital where the outbreak was first known. [1]<p>This article points out that a lab outbreak could have happened in the United States and many places in the world. We need to avoid demonizing China over this if we want to ever find out the truth and learn how to prevent another pandemic outbreak.<p>[1] <a href=\"https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.researchgate.net&#x2F;publication&#x2F;339070128_The_possible_origins_of_2019-nCoV_coronavirus\" rel=\"nofollow\">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.resea...</a>","points":1,"created":1616450455,"dead":false,"_id":1}'
REDIS ReplyError: WRONGTYPE Operation against a key holding the wrong kind of value
    at parseError (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:302:14) {
  command: 'JSON.SET',
  args: [
    'comment:1',
    '.',
    `{"id":"DMBEoWbaa0WZ","by":"gregwebs","parentItemId":"R4cdBL00W4Dp","parentItemTitle":"Why the Wuhan lab leak theory shouldn't be dismissed","isParent":true,"parentCommentId":"","children":[],"text":"This is a great article explaining why a lab leak should always be a suspect. The alternative theory is that a virus traveled on its own (via bats or other animals) from bat caves 900km away to Wuhan where there are 2 labs researching bats. One of the labs is lesser known but is right next to the seafood market and the hospital where the outbreak was first known. [1]<p>This article points out that a lab outbreak could have happened in the United States and many places in the world. We need to avoid demonizing China over this if we want to ever find out the truth and learn how to prevent another pandemic outbreak.<p>[1] <a href=\\"https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.researchgate.net&#x2F;publication&#x2F;339070128_The_possible_origins_of_2019-nCoV_coronavirus\\" rel=\\"nofollow\\">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.resea...</a>","points":1,"created":1616450455,"dead":false,"_id":1}`
  ],
  code: 'WRONGTYPE'
}
REDIS REDIS RUN -  HSET comment:1 id DMBEoWbaa0WZ by gregwebs parentItemId R4cdBL00W4Dp parentItemTitle Why the Wuhan lab leak theory shouldn't be dismissed isParent true parentCommentId  text This is a great article explaining why a lab leak should always be a suspect. The alternative theory is that a virus traveled on its own (via bats or other animals) from bat caves 900km away to Wuhan where there are 2 labs researching bats. One of the labs is lesser known but is right next to the seafood market and the hospital where the outbreak was first known. [1]<p>This article points out that a lab outbreak could have happened in the United States and many places in the world. We need to avoid demonizing China over this if we want to ever find out the truth and learn how to prevent another pandemic outbreak.<p>[1] <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.researchgate.net&#x2F;publication&#x2F;339070128_The_possible_origins_of_2019-nCoV_coronavirus" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.resea...</a> points 1 created 1616450455 dead false _id 1
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET comment:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:1 . '{"id":"DMBEoWbaa0WZ","by":"gregwebs","parentItemId":"R4cdBL00W4Dp","parentItemTitle":"Why the Wuhan lab leak theory shouldn't be dismissed","isParent":true,"parentCommentId":"","children":[],"text":"This is a great article explaining why a lab leak should always be a suspect. The alternative theory is that a virus traveled on its own (via bats or other animals) from bat caves 900km away to Wuhan where there are 2 labs researching bats. One of the labs is lesser known but is right next to the seafood market and the hospital where the outbreak was first known. [1]<p>This article points out that a lab outbreak could have happened in the United States and many places in the world. We need to avoid demonizing China over this if we want to ever find out the truth and learn how to prevent another pandemic outbreak.<p>[1] <a href=\"https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.researchgate.net&#x2F;publication&#x2F;339070128_The_possible_origins_of_2019-nCoV_coronavirus\" rel=\"nofollow\">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.resea...</a>","points":1,"created":1616450455,"dead":false,"_id":1}'
REDIS ReplyError: WRONGTYPE Operation against a key holding the wrong kind of value
    at parseError (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:302:14) {
  command: 'JSON.SET',
  args: [
    'comment:1',
    '.',
    `{"id":"DMBEoWbaa0WZ","by":"gregwebs","parentItemId":"R4cdBL00W4Dp","parentItemTitle":"Why the Wuhan lab leak theory shouldn't be dismissed","isParent":true,"parentCommentId":"","children":[],"text":"This is a great article explaining why a lab leak should always be a suspect. The alternative theory is that a virus traveled on its own (via bats or other animals) from bat caves 900km away to Wuhan where there are 2 labs researching bats. One of the labs is lesser known but is right next to the seafood market and the hospital where the outbreak was first known. [1]<p>This article points out that a lab outbreak could have happened in the United States and many places in the world. We need to avoid demonizing China over this if we want to ever find out the truth and learn how to prevent another pandemic outbreak.<p>[1] <a href=\\"https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.researchgate.net&#x2F;publication&#x2F;339070128_The_possible_origins_of_2019-nCoV_coronavirus\\" rel=\\"nofollow\\">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200214144447&#x2F;https:&#x2F;&#x2F;www.resea...</a>","points":1,"created":1616450455,"dead":false,"_id":1}`
  ],
  code: 'WRONGTYPE'
}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"woodruffw") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "2"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  3
REDIS REDIS RUN -  HSET user:2 username woodruffw email  created 1432660936 karma 5969 about  showDead false isModerator false shadowBanned false banned false _id 2
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:2 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:2 . '{"username":"woodruffw","password":"$2a$10$VGiaGIK6eQmRHsk4pV4lEe4Tu60Ll.XBCk3OVt0WWVrrRIwA9wJM.","email":"","created":1432660936,"karma":5969,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":2}'
REDIS ReplyError: WRONGTYPE Operation against a key holding the wrong kind of value
    at parseError (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/redis-hacker-news-demo/node_modules/redis-parser/lib/parser.js:302:14) {
  command: 'JSON.SET',
  args: [
    'user:2',
    '.',
    '{"username":"woodruffw","password":"$2a$10$VGiaGIK6eQmRHsk4pV4lEe4Tu60Ll.XBCk3OVt0WWVrrRIwA9wJM.","email":"","created":1432660936,"karma":5969,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":2}'
  ],
  code: 'WRONGTYPE'
}

Any pointers you can help me with please?

ITsolution-git commented 3 years ago

@spurin It expects redisJSON and redisearch to be 2 different servers. It uses the same key for hash and json in different servers. It targeted for the free redis servers on redislabs.

To support single server, we might need to change the logic a bit. Which is just changing the keys for json server, user-1 to json-user-1 or something similar. (Or change the key in hash server)

It's handled in libs/redis-db/model.js. FYI

ajeetraina commented 3 years ago

@ITsolution-git I tried using 2 different Redis Cloud database and I am getting this error:

node ./backend/scripts/seed.js
REDIS REDIS RUN -  FLUSHALL 
REDIS REDIS RESULT -  "OK"
REDIS REDIS RUN -  FLUSHALL 
REDIS REDIS RESULT -  "OK"
REDIS Creating index of user - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user
REDIS Creating index of user-favorite - [object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user-favorite
REDIS Creating index of user-hidden - [object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user-hidden
REDIS Creating index of user-vote - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:user-vote
REDIS Creating index of moderation-log - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:moderation-log
REDIS Creating index of item - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:item
REDIS Creating index of comment - [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REDIS REDIS RUN -  FT.INFO idx:comment
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  FT.DROPINDEX idx:user
REDIS REDIS RUN -  FT.DROPINDEX idx:user-favorite
REDIS REDIS RUN -  FT.DROPINDEX idx:user-hidden
REDIS REDIS RUN -  FT.DROPINDEX idx:user-vote
REDIS REDIS RUN -  FT.DROPINDEX idx:moderation-log
REDIS REDIS RUN -  FT.DROPINDEX idx:item
REDIS REDIS RUN -  FT.DROPINDEX idx:comment
REDIS REDIS RESULT -  undefined
REDIS REDIS RUN -  FT.CREATE idx:user ON hash PREFIX 1 user: SCHEMA username TEXT SORTABLE email TEXT SORTABLE created NUMERIC SORTABLE karma NUMERIC SORTABLE about TEXT showDead TEXT isModerator TEXT shadowBanned TEXT banned TEXT _id TEXT SORTABLE
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RESULT -  undefined
REDIS REDIS RUN -  FT.CREATE idx:user-favorite ON hash PREFIX 1 user-favorite: SCHEMA username TEXT SORTABLE type TEXT SORTABLE id TEXT SORTABLE date NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:user-hidden ON hash PREFIX 1 user-hidden: SCHEMA username TEXT SORTABLE id TEXT SORTABLE date NUMERIC SORTABLE itemCreationDate NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:user-vote ON hash PREFIX 1 user-vote: SCHEMA username TEXT SORTABLE type TEXT SORTABLE id TEXT SORTABLE parentItemId TEXT SORTABLE upvote TEXT SORTABLE downvote TEXT SORTABLE date NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:moderation-log ON hash PREFIX 1 moderation-log: SCHEMA moderatorUsername TEXT SORTABLE actionType TEXT SORTABLE username TEXT SORTABLE itemId TEXT SORTABLE itemTitle TEXT SORTABLE itemBy TEXT SORTABLE commentId TEXT SORTABLE commentBy TEXT SORTABLE created NUMERIC SORTABLE _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:item ON hash PREFIX 1 item: SCHEMA id TEXT SORTABLE by TEXT SORTABLE title TEXT SORTABLE type TEXT SORTABLE url TEXT SORTABLE domain TEXT SORTABLE text TEXT SORTABLE points NUMERIC SORTABLE score NUMERIC SORTABLE created NUMERIC SORTABLE dead TEXT _id TEXT SORTABLE
REDIS REDIS RUN -  FT.CREATE idx:comment ON hash PREFIX 1 comment: SCHEMA id TEXT by TEXT parentItemId TEXT parentItemTitle TEXT SORTABLE isParent TEXT parentCommentId TEXT text TEXT points NUMERIC SORTABLE created NUMERIC SORTABLE dead TEXT _id TEXT SORTABLE
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RESULT -  "OK"
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"pdoconnell") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  1
REDIS REDIS RUN -  HSET user:1 username pdoconnell email  created 1381358658 karma 1598 about  showDead false isModerator false shadowBanned false banned false _id 1
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:1 . '{"username":"pdoconnell","password":"$2a$10$fWWw7f/qt10BcY3NRArK6emhxDWjeKzBOt1N27iG/IjlzWhhJuf/K","email":"","created":1381358658,"karma":1598,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":1}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:1 .
REDIS REDIS RESULT -  {"username":"pdoconnell","password":"$2a$10$fWWw7f/qt10BcY3NRArK6emhxDWjeKzBOt1N27iG/IjlzWhhJuf/K","email":"","created":1381358658,"karma":1598,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":1}
REDIS REDIS RUN -  GET item:id-indicator
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  INCR item:id-indicator
REDIS REDIS RESULT -  1
REDIS REDIS RUN -  HSET item:1 id eZku8Y1utcAV by pdoconnell title Google’s copying of the Java SE API was fair use [pdf] type news url https://www.supremecourt.gov/opinions/20pdf/18-956_d18f.pdf domain supremecourt.gov points 1 score 4062 created 1617631462 dead false _id 1
REDIS REDIS RESULT -  11
REDIS REDIS RUN -  JSON.SET item:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET item:1 . '{"id":"eZku8Y1utcAV","by":"pdoconnell","title":"Google’s copying of the Java SE API was fair use [pdf]","type":"news","url":"https://www.supremecourt.gov/opinions/20pdf/18-956_d18f.pdf","domain":"supremecourt.gov","points":1,"score":4062,"commentCount":0,"created":1617631462,"dead":false,"_id":1}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET item:1 .
REDIS REDIS RESULT -  {"id":"eZku8Y1utcAV","by":"pdoconnell","title":"Google’s copying of the Java SE API was fair use [pdf]","type":"news","url":"https://www.supremecourt.gov/opinions/20pdf/18-956_d18f.pdf","domain":"supremecourt.gov","points":1,"score":4062,"commentCount":0,"created":1617631462,"dead":false,"_id":1}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"dang") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "1"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  2
REDIS REDIS RUN -  HSET user:1 username dang email  created 1187454947 karma 15717 about  showDead false isModerator false shadowBanned false banned false _id 1
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET user:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:1 . '{"username":"dang","password":"$2a$10$dbi7j5swVlfxEU52WCVSQOvcSVk.B5MqaOH4TZJqbVhp2EdaagKPC","email":"","created":1187454947,"karma":15717,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":1}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:1 .
REDIS REDIS RESULT -  {"username":"dang","password":"$2a$10$dbi7j5swVlfxEU52WCVSQOvcSVk.B5MqaOH4TZJqbVhp2EdaagKPC","email":"","created":1187454947,"karma":15717,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":1}
REDIS REDIS RUN -  GET comment:id-indicator
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  INCR comment:id-indicator
REDIS REDIS RESULT -  1
REDIS REDIS RUN -  HSET comment:1 id mGLlZUDP2huO by dang parentItemId eZku8Y1utcAV parentItemTitle Google’s copying of the Java SE API was fair use [pdf] isParent true parentCommentId  text Threads are paginated for performance reasons (yes we&#x27;re working on it), so to see the rest of the comments you need to click More at the bottom of the page, or like this:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3</a><p>(If you&#x27;ve already seen a bunch of these, I apologize for the annoying repetition.) points 1 created 1617641791 dead false _id 1
REDIS REDIS RESULT -  11
REDIS REDIS RUN -  JSON.SET comment:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:1 . '{"id":"mGLlZUDP2huO","by":"dang","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"Threads are paginated for performance reasons (yes we&#x27;re working on it), so to see the rest of the comments you need to click More at the bottom of the page, or like this:<p><a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2\" rel=\"nofollow\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2</a><p><a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3\" rel=\"nofollow\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3</a><p>(If you&#x27;ve already seen a bunch of these, I apologize for the annoying repetition.)","points":1,"created":1617641791,"dead":false,"_id":1}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:1 .
REDIS REDIS RESULT -  {"id":"mGLlZUDP2huO","by":"dang","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"Threads are paginated for performance reasons (yes we&#x27;re working on it), so to see the rest of the comments you need to click More at the bottom of the page, or like this:<p><a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2\" rel=\"nofollow\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2</a><p><a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3\" rel=\"nofollow\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3</a><p>(If you&#x27;ve already seen a bunch of these, I apologize for the annoying repetition.)","points":1,"created":1617641791,"dead":false,"_id":1}
REDIS REDIS RUN -  HSET comment:1 id mGLlZUDP2huO by dang parentItemId eZku8Y1utcAV parentItemTitle Google’s copying of the Java SE API was fair use [pdf] isParent true parentCommentId  text Threads are paginated for performance reasons (yes we&#x27;re working on it), so to see the rest of the comments you need to click More at the bottom of the page, or like this:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3</a><p>(If you&#x27;ve already seen a bunch of these, I apologize for the annoying repetition.) points 1 created 1617641791 dead false _id 1
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET comment:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:1 . '{"id":"mGLlZUDP2huO","by":"dang","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"Threads are paginated for performance reasons (yes we&#x27;re working on it), so to see the rest of the comments you need to click More at the bottom of the page, or like this:<p><a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2\" rel=\"nofollow\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2</a><p><a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3\" rel=\"nofollow\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3</a><p>(If you&#x27;ve already seen a bunch of these, I apologize for the annoying repetition.)","points":1,"created":1617641791,"dead":false,"_id":1}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:1 .
REDIS REDIS RESULT -  {"id":"mGLlZUDP2huO","by":"dang","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"Threads are paginated for performance reasons (yes we&#x27;re working on it), so to see the rest of the comments you need to click More at the bottom of the page, or like this:<p><a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2\" rel=\"nofollow\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=2</a><p><a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3\" rel=\"nofollow\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26699106&amp;p=3</a><p>(If you&#x27;ve already seen a bunch of these, I apologize for the annoying repetition.)","points":1,"created":1617641791,"dead":false,"_id":1}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"jxf") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "2"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  3
REDIS REDIS RUN -  HSET user:2 username jxf email  created 1306095568 karma 2930 about  showDead false isModerator false shadowBanned false banned false _id 2
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:2 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:2 . '{"username":"jxf","password":"$2a$10$sJ1MQmY2lRdzVjhq/CP5x.F3LA4AxU1Cp5ARqL/Yw54ofukouxmIu","email":"","created":1306095568,"karma":2930,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":2}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:2 .
REDIS REDIS RESULT -  {"username":"jxf","password":"$2a$10$sJ1MQmY2lRdzVjhq/CP5x.F3LA4AxU1Cp5ARqL/Yw54ofukouxmIu","email":"","created":1306095568,"karma":2930,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":2}
REDIS REDIS RUN -  GET comment:id-indicator
REDIS REDIS RESULT -  "1"
REDIS REDIS RUN -  INCR comment:id-indicator
REDIS REDIS RESULT -  2
REDIS REDIS RUN -  HSET comment:1 id B9CSpr5k3rU4 by jxf parentItemId eZku8Y1utcAV parentItemTitle Google’s copying of the Java SE API was fair use [pdf] isParent true parentCommentId  text While the result is a big relief, I think it&#x27;s not as decisive as I&#x27;m noticing some headlines (and commenters) are claiming.<p>One of the big open questions is &quot;are APIs copyrightable?&quot; The court skirted that question, and instead focused on whether it was fair use:<p>&gt; To decide no more than is necessary to resolve this case, the Court assumes for argument’s sake that the copied lines can be copyrighted, and focuses on whether Google’s use of those lines was a “fair use.”<p>That said, this case does establish a precedent that if your copying of an API is primarily for purposes of matching an interface so that developers can reimplement it, you&#x27;re in fair use territory:<p>&gt; Google copied these lines not because of their creativity or beauty but because they would allow programmers to bring their skills to a new smartphone computing environment.<p>I&#x27;ll count that as a win, on balance. points 1 created 1617632961 dead false _id 1
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET comment:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:1 . '{"id":"B9CSpr5k3rU4","by":"jxf","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"While the result is a big relief, I think it&#x27;s not as decisive as I&#x27;m noticing some headlines (and commenters) are claiming.<p>One of the big open questions is &quot;are APIs copyrightable?&quot; The court skirted that question, and instead focused on whether it was fair use:<p>&gt; To decide no more than is necessary to resolve this case, the Court assumes for argument’s sake that the copied lines can be copyrighted, and focuses on whether Google’s use of those lines was a “fair use.”<p>That said, this case does establish a precedent that if your copying of an API is primarily for purposes of matching an interface so that developers can reimplement it, you&#x27;re in fair use territory:<p>&gt; Google copied these lines not because of their creativity or beauty but because they would allow programmers to bring their skills to a new smartphone computing environment.<p>I&#x27;ll count that as a win, on balance.","points":1,"created":1617632961,"dead":false,"_id":1}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:1 .
REDIS REDIS RESULT -  {"id":"B9CSpr5k3rU4","by":"jxf","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"While the result is a big relief, I think it&#x27;s not as decisive as I&#x27;m noticing some headlines (and commenters) are claiming.<p>One of the big open questions is &quot;are APIs copyrightable?&quot; The court skirted that question, and instead focused on whether it was fair use:<p>&gt; To decide no more than is necessary to resolve this case, the Court assumes for argument’s sake that the copied lines can be copyrighted, and focuses on whether Google’s use of those lines was a “fair use.”<p>That said, this case does establish a precedent that if your copying of an API is primarily for purposes of matching an interface so that developers can reimplement it, you&#x27;re in fair use territory:<p>&gt; Google copied these lines not because of their creativity or beauty but because they would allow programmers to bring their skills to a new smartphone computing environment.<p>I&#x27;ll count that as a win, on balance.","points":1,"created":1617632961,"dead":false,"_id":1}
REDIS REDIS RUN -  HSET comment:1 id B9CSpr5k3rU4 by jxf parentItemId eZku8Y1utcAV parentItemTitle Google’s copying of the Java SE API was fair use [pdf] isParent true parentCommentId  text While the result is a big relief, I think it&#x27;s not as decisive as I&#x27;m noticing some headlines (and commenters) are claiming.<p>One of the big open questions is &quot;are APIs copyrightable?&quot; The court skirted that question, and instead focused on whether it was fair use:<p>&gt; To decide no more than is necessary to resolve this case, the Court assumes for argument’s sake that the copied lines can be copyrighted, and focuses on whether Google’s use of those lines was a “fair use.”<p>That said, this case does establish a precedent that if your copying of an API is primarily for purposes of matching an interface so that developers can reimplement it, you&#x27;re in fair use territory:<p>&gt; Google copied these lines not because of their creativity or beauty but because they would allow programmers to bring their skills to a new smartphone computing environment.<p>I&#x27;ll count that as a win, on balance. points 1 created 1617632961 dead false _id 1
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET comment:1 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:1 . '{"id":"B9CSpr5k3rU4","by":"jxf","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"While the result is a big relief, I think it&#x27;s not as decisive as I&#x27;m noticing some headlines (and commenters) are claiming.<p>One of the big open questions is &quot;are APIs copyrightable?&quot; The court skirted that question, and instead focused on whether it was fair use:<p>&gt; To decide no more than is necessary to resolve this case, the Court assumes for argument’s sake that the copied lines can be copyrighted, and focuses on whether Google’s use of those lines was a “fair use.”<p>That said, this case does establish a precedent that if your copying of an API is primarily for purposes of matching an interface so that developers can reimplement it, you&#x27;re in fair use territory:<p>&gt; Google copied these lines not because of their creativity or beauty but because they would allow programmers to bring their skills to a new smartphone computing environment.<p>I&#x27;ll count that as a win, on balance.","points":1,"created":1617632961,"dead":false,"_id":1}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:1 .
REDIS REDIS RESULT -  {"id":"B9CSpr5k3rU4","by":"jxf","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"While the result is a big relief, I think it&#x27;s not as decisive as I&#x27;m noticing some headlines (and commenters) are claiming.<p>One of the big open questions is &quot;are APIs copyrightable?&quot; The court skirted that question, and instead focused on whether it was fair use:<p>&gt; To decide no more than is necessary to resolve this case, the Court assumes for argument’s sake that the copied lines can be copyrighted, and focuses on whether Google’s use of those lines was a “fair use.”<p>That said, this case does establish a precedent that if your copying of an API is primarily for purposes of matching an interface so that developers can reimplement it, you&#x27;re in fair use territory:<p>&gt; Google copied these lines not because of their creativity or beauty but because they would allow programmers to bring their skills to a new smartphone computing environment.<p>I&#x27;ll count that as a win, on balance.","points":1,"created":1617632961,"dead":false,"_id":1}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"teruakohatu") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "3"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  4
REDIS REDIS RUN -  HSET user:3 username teruakohatu email  created 1578690254 karma 3304 about  showDead false isModerator false shadowBanned false banned false _id 3
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:3 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:3 . '{"username":"teruakohatu","password":"$2a$10$Zp6.sh0r0uI.edfOZ0vx7OvuJ4eS.wO/HAxwPkp9PYoEYxg.mZODO","email":"","created":1578690254,"karma":3304,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":3}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:3 .
REDIS REDIS RESULT -  {"username":"teruakohatu","password":"$2a$10$Zp6.sh0r0uI.edfOZ0vx7OvuJ4eS.wO/HAxwPkp9PYoEYxg.mZODO","email":"","created":1578690254,"karma":3304,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":3}
REDIS REDIS RUN -  GET comment:id-indicator
REDIS REDIS RESULT -  "2"
REDIS REDIS RUN -  INCR comment:id-indicator
REDIS REDIS RESULT -  3
REDIS REDIS RUN -  HSET comment:2 id lZZstDCFsUZJ by teruakohatu parentItemId eZku8Y1utcAV parentItemTitle Google’s copying of the Java SE API was fair use [pdf] isParent true parentCommentId  text &gt; &quot;Google  copied  approximately  11,500 lines of declaring  code from the API,  which amounts to virtually all the declaring  code needed to call up hundreds  of different tasks.   Those 11,500  lines, however, are only  0.4 percent of the entire  API at issue, which consists  of 2.86 million total lines.  In considering “the amount and substantiality of the portion  used” in  this case, the 11,500 lines of code should be viewed as one small part of the  considerably  greater whole.   As  part of an interface, the copied lines of code are inextricably bound to  other lines of code that  are  accessed by  programmers.   Google copied  these lines not because of their creativity or  beauty  but because they would allow programmers  to bring  their  skills to a new smartphone computing  environment.&quot;<p>Sanity prevailed! This judgment could have had devastating consequences and turned software development into a copyright nightmare. points 1 created 1617632059 dead false _id 2
REDIS REDIS RESULT -  11
REDIS REDIS RUN -  JSON.SET comment:2 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:2 . '{"id":"lZZstDCFsUZJ","by":"teruakohatu","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"&gt; &quot;Google  copied  approximately  11,500 lines of declaring  code from the API,  which amounts to virtually all the declaring  code needed to call up hundreds  of different tasks.   Those 11,500  lines, however, are only  0.4 percent of the entire  API at issue, which consists  of 2.86 million total lines.  In considering “the amount and substantiality of the portion  used” in  this case, the 11,500 lines of code should be viewed as one small part of the  considerably  greater whole.   As  part of an interface, the copied lines of code are inextricably bound to  other lines of code that  are  accessed by  programmers.   Google copied  these lines not because of their creativity or  beauty  but because they would allow programmers  to bring  their  skills to a new smartphone computing  environment.&quot;<p>Sanity prevailed! This judgment could have had devastating consequences and turned software development into a copyright nightmare.","points":1,"created":1617632059,"dead":false,"_id":2}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:2 .
REDIS REDIS RESULT -  {"id":"lZZstDCFsUZJ","by":"teruakohatu","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"&gt; &quot;Google  copied  approximately  11,500 lines of declaring  code from the API,  which amounts to virtually all the declaring  code needed to call up hundreds  of different tasks.   Those 11,500  lines, however, are only  0.4 percent of the entire  API at issue, which consists  of 2.86 million total lines.  In considering “the amount and substantiality of the portion  used” in  this case, the 11,500 lines of code should be viewed as one small part of the  considerably  greater whole.   As  part of an interface, the copied lines of code are inextricably bound to  other lines of code that  are  accessed by  programmers.   Google copied  these lines not because of their creativity or  beauty  but because they would allow programmers  to bring  their  skills to a new smartphone computing  environment.&quot;<p>Sanity prevailed! This judgment could have had devastating consequences and turned software development into a copyright nightmare.","points":1,"created":1617632059,"dead":false,"_id":2}
REDIS REDIS RUN -  HSET comment:2 id lZZstDCFsUZJ by teruakohatu parentItemId eZku8Y1utcAV parentItemTitle Google’s copying of the Java SE API was fair use [pdf] isParent true parentCommentId  text &gt; &quot;Google  copied  approximately  11,500 lines of declaring  code from the API,  which amounts to virtually all the declaring  code needed to call up hundreds  of different tasks.   Those 11,500  lines, however, are only  0.4 percent of the entire  API at issue, which consists  of 2.86 million total lines.  In considering “the amount and substantiality of the portion  used” in  this case, the 11,500 lines of code should be viewed as one small part of the  considerably  greater whole.   As  part of an interface, the copied lines of code are inextricably bound to  other lines of code that  are  accessed by  programmers.   Google copied  these lines not because of their creativity or  beauty  but because they would allow programmers  to bring  their  skills to a new smartphone computing  environment.&quot;<p>Sanity prevailed! This judgment could have had devastating consequences and turned software development into a copyright nightmare. points 1 created 1617632059 dead false _id 2
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET comment:2 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:2 . '{"id":"lZZstDCFsUZJ","by":"teruakohatu","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"&gt; &quot;Google  copied  approximately  11,500 lines of declaring  code from the API,  which amounts to virtually all the declaring  code needed to call up hundreds  of different tasks.   Those 11,500  lines, however, are only  0.4 percent of the entire  API at issue, which consists  of 2.86 million total lines.  In considering “the amount and substantiality of the portion  used” in  this case, the 11,500 lines of code should be viewed as one small part of the  considerably  greater whole.   As  part of an interface, the copied lines of code are inextricably bound to  other lines of code that  are  accessed by  programmers.   Google copied  these lines not because of their creativity or  beauty  but because they would allow programmers  to bring  their  skills to a new smartphone computing  environment.&quot;<p>Sanity prevailed! This judgment could have had devastating consequences and turned software development into a copyright nightmare.","points":1,"created":1617632059,"dead":false,"_id":2}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:2 .
REDIS REDIS RESULT -  {"id":"lZZstDCFsUZJ","by":"teruakohatu","parentItemId":"eZku8Y1utcAV","parentItemTitle":"Google’s copying of the Java SE API was fair use [pdf]","isParent":true,"parentCommentId":"","children":[],"text":"&gt; &quot;Google  copied  approximately  11,500 lines of declaring  code from the API,  which amounts to virtually all the declaring  code needed to call up hundreds  of different tasks.   Those 11,500  lines, however, are only  0.4 percent of the entire  API at issue, which consists  of 2.86 million total lines.  In considering “the amount and substantiality of the portion  used” in  this case, the 11,500 lines of code should be viewed as one small part of the  considerably  greater whole.   As  part of an interface, the copied lines of code are inextricably bound to  other lines of code that  are  accessed by  programmers.   Google copied  these lines not because of their creativity or  beauty  but because they would allow programmers  to bring  their  skills to a new smartphone computing  environment.&quot;<p>Sanity prevailed! This judgment could have had devastating consequences and turned software development into a copyright nightmare.","points":1,"created":1617632059,"dead":false,"_id":2}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"lmueongoqx") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "4"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  5
REDIS REDIS RUN -  HSET user:4 username lmueongoqx email  created 1617784111 karma 403 about  showDead false isModerator false shadowBanned false banned false _id 4
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:4 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:4 . '{"username":"lmueongoqx","password":"$2a$10$DIyS9KdoGXxIAlHk6KbCVuDDgyuFAcEAZRidLAGIgOTU1lBhGXFzy","email":"","created":1617784111,"karma":403,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":4}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:4 .
REDIS REDIS RESULT -  {"username":"lmueongoqx","password":"$2a$10$DIyS9KdoGXxIAlHk6KbCVuDDgyuFAcEAZRidLAGIgOTU1lBhGXFzy","email":"","created":1617784111,"karma":403,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":4}
node:internal/process/promises:245
          triggerUncaughtException(err, true /* fromPromise */);
          ^

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:329:5)
    at validateString (node:internal/validators:129:11)
    at Url.parse (node:url:170:3)
    at Object.urlParse [as parse] (node:url:157:13)
    at Object.getDomainFromUrl (/Users/ajeetraina/projects/redis-hacker-news-demo/backend/routes/utils.js:16:26)
    at runSeed (/Users/ajeetraina/projects/redis-hacker-news-demo/backend/scripts/runSeed.js:107:21)
    at processTicksAndRejections (node:internal/process/task_queues:94:5) {
  code: 'ERR_INVALID_ARG_TYPE'
ajeetraina commented 3 years ago

@spurin Did you manage to get it working?

spurin commented 3 years ago

Hi @ajeetraina,

Glad to see I'm not the only one who's excited about seeing this working :-) Unfortunately, I haven't and got the same issue as you. I did quickly change a subsection of the code for testing purposes and it seemed to run through to completion but, I see nothing on the page other than 'An error occurred.'

For reference, this is what I changed in runSeed.js, adding in a fixed string for story.url -

module.exports = async function runSeed(maxStories) {

  const bestStories = await hackernews.getBestStories(maxStories)

  for (let i = 0; i < bestStories.length; i ++) {
    const story = await hackernews.getItemById(bestStories[i])
    if (story.type !== 'story') {
      continue
    }

    story.url = "http://news.bbc.co.uk"
    const user = await createUserIfNotExists(story.by)

    const newItem = await new ItemModel({
      id: utils.generateUniqueId(12),
      by: story.by,
      title: story.title,
      type: utils.getItemType(story.title, story.url, story.text),
      url: story.url,
      domain: utils.getDomainFromUrl(story.url),
      text: story.text,
      created: story.time,
      dead: false,
      score: story.score,
    })
    await newItem.save()

    await createComments(newItem, story.kids, 0, newItem)
  }

  await createAModerator()
}

I followed the advice of @ITsolution-git and ran a separate server for redis search/json and like yourself, that got me further but this is where I'm at now.

For convenience, I wrapped the install with docker-compose and I've put it here for anyone who wishes to quickly test/troubleshoot this further (by just running docker-compose up from the dir) - https://github.com/spurin/redis-hacker-news-clone

ajeetraina commented 3 years ago

@spurin I followed your workaround and could see that seeding is working to some extend. The URL is still not coming up and showing "Internal Server Error" but I do see the logs:

sParent true parentCommentId  text Every time Facebook&#x2F;Gmail&#x2F;Google&#x2F;Amazon&#x2F;LinkedIn&#x2F;Tinder&#x2F;whoever asks me to give them phone number &quot;just in case&quot; my first and only thought is &quot;hell no&quot;. I haven&#x27;t been wrong a single time. points 1 created 1617707354 dead false _id 56
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET comment:56 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:56 . '{"id":"pIqH92XwahjE","by":"durnygbur","parentItemId":"dfMhMLheVN7G","parentItemTitle":"The Facebook phone numbers are now searchable in Have I Been Pwned","isParent":true,"parentCommentId":"","children":[],"text":"Every time Facebook&#x2F;Gmail&#x2F;Google&#x2F;Amazon&#x2F;LinkedIn&#x2F;Tinder&#x2F;whoever asks me to give them phone number &quot;just in case&quot; my first and only thought is &quot;hell no&quot;. I haven&#x27;t been wrong a single time.","points":1,"created":1617707354,"dead":false,"_id":56}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:56 .
REDIS REDIS RESULT -  {"id":"pIqH92XwahjE","by":"durnygbur","parentItemId":"dfMhMLheVN7G","parentItemTitle":"The Facebook phone numbers are now searchable in Have I Been Pwned","isParent":true,"parentCommentId":"","children":[],"text":"Every time Facebook&#x2F;Gmail&#x2F;Google&#x2F;Amazon&#x2F;LinkedIn&#x2F;Tinder&#x2F;whoever asks me to give them phone number &quot;just in case&quot; my first and only thought is &quot;hell no&quot;. I haven&#x27;t been wrong a single time.","points":1,"created":1617707354,"dead":false,"_id":56}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"furcyd") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "74"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  75
REDIS REDIS RUN -  HSET user:74 username furcyd email  created 1544369213 karma 6475 about  showDead false isModerator false shadowBanned false banned false _id 74
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:74 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:74 . '{"username":"furcyd","password":"$2a$10$1Dn1/OBtSjbr/85MjQnITeK7oz8/Pt1sirNbUjQBskzXrMVzrPxUS","email":"","created":1544369213,"karma":6475,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":74}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:74 .
REDIS REDIS RESULT -  {"username":"furcyd","password":"$2a$10$1Dn1/OBtSjbr/85MjQnITeK7oz8/Pt1sirNbUjQBskzXrMVzrPxUS","email":"","created":1544369213,"karma":6475,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":74}
REDIS REDIS RUN -  GET item:id-indicator
REDIS REDIS RESULT -  "19"
REDIS REDIS RUN -  INCR item:id-indicator
REDIS REDIS RESULT -  20
REDIS REDIS RUN -  HSET item:19 id mmA7goJNC1Is by furcyd title Particle mystery: physicists confirm the muon is more magnetic than predicted type news url http://community1.collabnix.com domain collabnix.com points 1 score 558 created 1617809163 dead false _id 19
REDIS REDIS RESULT -  11
REDIS REDIS RUN -  JSON.SET item:19 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET item:19 . '{"id":"mmA7goJNC1Is","by":"furcyd","title":"Particle mystery: physicists confirm the muon is more magnetic than predicted","type":"news","url":"http://community1.collabnix.com","domain":"collabnix.com","points":1,"score":558,"commentCount":0,"created":1617809163,"dead":false,"_id":19}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET item:19 .
REDIS REDIS RESULT -  {"id":"mmA7goJNC1Is","by":"furcyd","title":"Particle mystery: physicists confirm the muon is more magnetic than predicted","type":"news","url":"http://community1.collabnix.com","domain":"collabnix.com","points":1,"score":558,"commentCount":0,"created":1617809163,"dead":false,"_id":19}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"beezle") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "75"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  76
REDIS REDIS RUN -  HSET user:75 username beezle email  created 1412122175 karma 652 about  showDead false isModerator false shadowBanned false banned false _id 75
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:75 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:75 . '{"username":"beezle","password":"$2a$10$1qSsJHn358.ciOKrszfEDuwePZEcEjXkGB2kogAj3DCdT2lCciBn6","email":"","created":1412122175,"karma":652,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":75}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:75 .
REDIS REDIS RESULT -  {"username":"beezle","password":"$2a$10$1qSsJHn358.ciOKrszfEDuwePZEcEjXkGB2kogAj3DCdT2lCciBn6","email":"","created":1412122175,"karma":652,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":75}
REDIS REDIS RUN -  GET comment:id-indicator
REDIS REDIS RESULT -  "57"
REDIS REDIS RUN -  INCR comment:id-indicator
REDIS REDIS RESULT -  58
REDIS REDIS RUN -  HSET comment:57 id dN1dMWvsntTx by beezle parentItemId mmA7goJNC1Is parentItemTitle Particle mystery: physicists confirm the muon is more magnetic than predicted isParent true parentCommentId  text The Quanta write up is a bit more neutral on this announcement.  There is a computational result that was not included in the theoretical value used to bench the test against.  Once reviewed, this difference may yet go back to oblivion.<p><a href="https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407" rel="nofollow">https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermil...</a> points 1 created 1617812640 dead false _id 57
REDIS REDIS RESULT -  11
REDIS REDIS RUN -  JSON.SET comment:57 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:57 . '{"id":"dN1dMWvsntTx","by":"beezle","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"The Quanta write up is a bit more neutral on this announcement.  There is a computational result that was not included in the theoretical value used to bench the test against.  Once reviewed, this difference may yet go back to oblivion.<p><a href=\"https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407\" rel=\"nofollow\">https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermil...</a>","points":1,"created":1617812640,"dead":false,"_id":57}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:57 .
REDIS REDIS RESULT -  {"id":"dN1dMWvsntTx","by":"beezle","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"The Quanta write up is a bit more neutral on this announcement.  There is a computational result that was not included in the theoretical value used to bench the test against.  Once reviewed, this difference may yet go back to oblivion.<p><a href=\"https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407\" rel=\"nofollow\">https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermil...</a>","points":1,"created":1617812640,"dead":false,"_id":57}
REDIS REDIS RUN -  HSET comment:57 id dN1dMWvsntTx by beezle parentItemId mmA7goJNC1Is parentItemTitle Particle mystery: physicists confirm the muon is more magnetic than predicted isParent true parentCommentId  text The Quanta write up is a bit more neutral on this announcement.  There is a computational result that was not included in the theoretical value used to bench the test against.  Once reviewed, this difference may yet go back to oblivion.<p><a href="https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407" rel="nofollow">https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermil...</a> points 1 created 1617812640 dead false _id 57
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET comment:57 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:57 . '{"id":"dN1dMWvsntTx","by":"beezle","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"The Quanta write up is a bit more neutral on this announcement.  There is a computational result that was not included in the theoretical value used to bench the test against.  Once reviewed, this difference may yet go back to oblivion.<p><a href=\"https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407\" rel=\"nofollow\">https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermil...</a>","points":1,"created":1617812640,"dead":false,"_id":57}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:57 .
REDIS REDIS RESULT -  {"id":"dN1dMWvsntTx","by":"beezle","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"The Quanta write up is a bit more neutral on this announcement.  There is a computational result that was not included in the theoretical value used to bench the test against.  Once reviewed, this difference may yet go back to oblivion.<p><a href=\"https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407\" rel=\"nofollow\">https:&#x2F;&#x2F;www.quantamagazine.org&#x2F;muon-g-2-experiment-at-fermil...</a>","points":1,"created":1617812640,"dead":false,"_id":57}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"atty") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "76"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  77
REDIS REDIS RUN -  HSET user:76 username atty email  created 1569719752 karma 668 about  showDead false isModerator false shadowBanned false banned false _id 76
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:76 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:76 . '{"username":"atty","password":"$2a$10$H08Hwjgfo6CXXncYBuLYd.lqzRgbZ8K8vh7y0P5jzjDjNcQIEGTRK","email":"","created":1569719752,"karma":668,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":76}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:76 .
REDIS REDIS RESULT -  {"username":"atty","password":"$2a$10$H08Hwjgfo6CXXncYBuLYd.lqzRgbZ8K8vh7y0P5jzjDjNcQIEGTRK","email":"","created":1569719752,"karma":668,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":76}
REDIS REDIS RUN -  GET comment:id-indicator
REDIS REDIS RESULT -  "58"
REDIS REDIS RUN -  INCR comment:id-indicator
REDIS REDIS RESULT -  59
REDIS REDIS RUN -  HSET comment:58 id aAxtWI8PQXoj by atty parentItemId mmA7goJNC1Is parentItemTitle Particle mystery: physicists confirm the muon is more magnetic than predicted isParent true parentCommentId  text As someone who has worked in fields that use lattice calculations (on the experimental side), the new calculation is interesting, but I would not say it’s particularly convincing yet. Lattice calculations are VERY difficult, and are not always stable. I am not questioning whether they did their work well or not, just pointing out that in high energy physics and high energy nuclear physics, many times our experimental results are significantly better constrained and also undergo significantly more testing via reproduction of results by other experiments than our theory counterparts’ work. 
Is it possible that all of our previous experiments have had some sort of correlated systematic error in them? Unlikely, but yes. Is it more likely that this lattice calculation may be underestimating its errors? Much more likely. Another interesting option is that one of the theoretical calculations was actually done slightly wrong. My first guess would be the lattice result, since it’s newer, but both procedures are complicated, so it could be either. points 1 created 1617823402 dead false _id 58
REDIS REDIS RESULT -  11
REDIS REDIS RUN -  JSON.SET comment:58 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:58 . '{"id":"aAxtWI8PQXoj","by":"atty","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"As someone who has worked in fields that use lattice calculations (on the experimental side), the new calculation is interesting, but I would not say it’s particularly convincing yet. Lattice calculations are VERY difficult, and are not always stable. I am not questioning whether they did their work well or not, just pointing out that in high energy physics and high energy nuclear physics, many times our experimental results are significantly better constrained and also undergo significantly more testing via reproduction of results by other experiments than our theory counterparts’ work. \nIs it possible that all of our previous experiments have had some sort of correlated systematic error in them? Unlikely, but yes. Is it more likely that this lattice calculation may be underestimating its errors? Much more likely. Another interesting option is that one of the theoretical calculations was actually done slightly wrong. My first guess would be the lattice result, since it’s newer, but both procedures are complicated, so it could be either.","points":1,"created":1617823402,"dead":false,"_id":58}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:58 .
REDIS REDIS RESULT -  {"id":"aAxtWI8PQXoj","by":"atty","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"As someone who has worked in fields that use lattice calculations (on the experimental side), the new calculation is interesting, but I would not say it’s particularly convincing yet. Lattice calculations are VERY difficult, and are not always stable. I am not questioning whether they did their work well or not, just pointing out that in high energy physics and high energy nuclear physics, many times our experimental results are significantly better constrained and also undergo significantly more testing via reproduction of results by other experiments than our theory counterparts’ work. \nIs it possible that all of our previous experiments have had some sort of correlated systematic error in them? Unlikely, but yes. Is it more likely that this lattice calculation may be underestimating its errors? Much more likely. Another interesting option is that one of the theoretical calculations was actually done slightly wrong. My first guess would be the lattice result, since it’s newer, but both procedures are complicated, so it could be either.","points":1,"created":1617823402,"dead":false,"_id":58}
REDIS REDIS RUN -  HSET comment:58 id aAxtWI8PQXoj by atty parentItemId mmA7goJNC1Is parentItemTitle Particle mystery: physicists confirm the muon is more magnetic than predicted isParent true parentCommentId  text As someone who has worked in fields that use lattice calculations (on the experimental side), the new calculation is interesting, but I would not say it’s particularly convincing yet. Lattice calculations are VERY difficult, and are not always stable. I am not questioning whether they did their work well or not, just pointing out that in high energy physics and high energy nuclear physics, many times our experimental results are significantly better constrained and also undergo significantly more testing via reproduction of results by other experiments than our theory counterparts’ work. 
Is it possible that all of our previous experiments have had some sort of correlated systematic error in them? Unlikely, but yes. Is it more likely that this lattice calculation may be underestimating its errors? Much more likely. Another interesting option is that one of the theoretical calculations was actually done slightly wrong. My first guess would be the lattice result, since it’s newer, but both procedures are complicated, so it could be either. points 1 created 1617823402 dead false _id 58
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET comment:58 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:58 . '{"id":"aAxtWI8PQXoj","by":"atty","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"As someone who has worked in fields that use lattice calculations (on the experimental side), the new calculation is interesting, but I would not say it’s particularly convincing yet. Lattice calculations are VERY difficult, and are not always stable. I am not questioning whether they did their work well or not, just pointing out that in high energy physics and high energy nuclear physics, many times our experimental results are significantly better constrained and also undergo significantly more testing via reproduction of results by other experiments than our theory counterparts’ work. \nIs it possible that all of our previous experiments have had some sort of correlated systematic error in them? Unlikely, but yes. Is it more likely that this lattice calculation may be underestimating its errors? Much more likely. Another interesting option is that one of the theoretical calculations was actually done slightly wrong. My first guess would be the lattice result, since it’s newer, but both procedures are complicated, so it could be either.","points":1,"created":1617823402,"dead":false,"_id":58}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:58 .
REDIS REDIS RESULT -  {"id":"aAxtWI8PQXoj","by":"atty","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"As someone who has worked in fields that use lattice calculations (on the experimental side), the new calculation is interesting, but I would not say it’s particularly convincing yet. Lattice calculations are VERY difficult, and are not always stable. I am not questioning whether they did their work well or not, just pointing out that in high energy physics and high energy nuclear physics, many times our experimental results are significantly better constrained and also undergo significantly more testing via reproduction of results by other experiments than our theory counterparts’ work. \nIs it possible that all of our previous experiments have had some sort of correlated systematic error in them? Unlikely, but yes. Is it more likely that this lattice calculation may be underestimating its errors? Much more likely. Another interesting option is that one of the theoretical calculations was actually done slightly wrong. My first guess would be the lattice result, since it’s newer, but both procedures are complicated, so it could be either.","points":1,"created":1617823402,"dead":false,"_id":58}
REDIS REDIS RUN -  FT.SEARCH idx:user  (@username:"podiki") NOCONTENT LIMIT 0 1 SORTBY _id DESC
REDIS REDIS RESULT -  [0]
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "77"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  78
REDIS REDIS RUN -  HSET user:77 username podiki email  created 1492544572 karma 766 about  showDead false isModerator false shadowBanned false banned false _id 77
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:77 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:77 . '{"username":"podiki","password":"$2a$10$Y0Lk4/NLdDVK4Q9VSWmX0OXlXsMO/5iPTmL8SdzP/2tTT72x/qABe","email":"","created":1492544572,"karma":766,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":77}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:77 .
REDIS REDIS RESULT -  {"username":"podiki","password":"$2a$10$Y0Lk4/NLdDVK4Q9VSWmX0OXlXsMO/5iPTmL8SdzP/2tTT72x/qABe","email":"","created":1492544572,"karma":766,"about":"","showDead":false,"isModerator":false,"shadowBanned":false,"banned":false,"_id":77}
REDIS REDIS RUN -  GET comment:id-indicator
REDIS REDIS RESULT -  "59"
REDIS REDIS RUN -  INCR comment:id-indicator
REDIS REDIS RESULT -  60
REDIS REDIS RUN -  HSET comment:59 id oniALfvGXZIJ by podiki parentItemId mmA7goJNC1Is parentItemTitle Particle mystery: physicists confirm the muon is more magnetic than predicted isParent true parentCommentId  text As a particle physicist (no longer working in the field, sadly), this is one of the more exciting results in a long time. Muon g-2 has been there, in some form of another for debate and model building, for many years (taken somewhat seriously for 15+?), waiting for better statistics and confirmation. At over 4 sigma this is much more compelling than it has ever been, and the best potential sign of new (non-Standard Model) physics.<p>I&#x27;m not current on what models people like to explain this result, but it has been factored in (or ignored if you didn&#x27;t trust it) in particle physics model building and phenomenology for years. This result makes it much more serious and something I imagine all new physics models (say for dark matter or other collider predictions or tensions in data) will be using.<p>Whether or not anything interesting is predicted, theoretically, from this remains to be seen. I don&#x27;t know off hand if it signals anything in particular, as the big ideas, like supersymmetry, are a bit removed from current collider experiments and aren&#x27;t necessarily tied to g-2 if I remember correctly. points 1 created 1617820197 dead false _id 59
REDIS REDIS RESULT -  11
REDIS REDIS RUN -  JSON.SET comment:59 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:59 . '{"id":"oniALfvGXZIJ","by":"podiki","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"As a particle physicist (no longer working in the field, sadly), this is one of the more exciting results in a long time. Muon g-2 has been there, in some form of another for debate and model building, for many years (taken somewhat seriously for 15+?), waiting for better statistics and confirmation. At over 4 sigma this is much more compelling than it has ever been, and the best potential sign of new (non-Standard Model) physics.<p>I&#x27;m not current on what models people like to explain this result, but it has been factored in (or ignored if you didn&#x27;t trust it) in particle physics model building and phenomenology for years. This result makes it much more serious and something I imagine all new physics models (say for dark matter or other collider predictions or tensions in data) will be using.<p>Whether or not anything interesting is predicted, theoretically, from this remains to be seen. I don&#x27;t know off hand if it signals anything in particular, as the big ideas, like supersymmetry, are a bit removed from current collider experiments and aren&#x27;t necessarily tied to g-2 if I remember correctly.","points":1,"created":1617820197,"dead":false,"_id":59}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:59 .
REDIS REDIS RESULT -  {"id":"oniALfvGXZIJ","by":"podiki","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"As a particle physicist (no longer working in the field, sadly), this is one of the more exciting results in a long time. Muon g-2 has been there, in some form of another for debate and model building, for many years (taken somewhat seriously for 15+?), waiting for better statistics and confirmation. At over 4 sigma this is much more compelling than it has ever been, and the best potential sign of new (non-Standard Model) physics.<p>I&#x27;m not current on what models people like to explain this result, but it has been factored in (or ignored if you didn&#x27;t trust it) in particle physics model building and phenomenology for years. This result makes it much more serious and something I imagine all new physics models (say for dark matter or other collider predictions or tensions in data) will be using.<p>Whether or not anything interesting is predicted, theoretically, from this remains to be seen. I don&#x27;t know off hand if it signals anything in particular, as the big ideas, like supersymmetry, are a bit removed from current collider experiments and aren&#x27;t necessarily tied to g-2 if I remember correctly.","points":1,"created":1617820197,"dead":false,"_id":59}
REDIS REDIS RUN -  HSET comment:59 id oniALfvGXZIJ by podiki parentItemId mmA7goJNC1Is parentItemTitle Particle mystery: physicists confirm the muon is more magnetic than predicted isParent true parentCommentId  text As a particle physicist (no longer working in the field, sadly), this is one of the more exciting results in a long time. Muon g-2 has been there, in some form of another for debate and model building, for many years (taken somewhat seriously for 15+?), waiting for better statistics and confirmation. At over 4 sigma this is much more compelling than it has ever been, and the best potential sign of new (non-Standard Model) physics.<p>I&#x27;m not current on what models people like to explain this result, but it has been factored in (or ignored if you didn&#x27;t trust it) in particle physics model building and phenomenology for years. This result makes it much more serious and something I imagine all new physics models (say for dark matter or other collider predictions or tensions in data) will be using.<p>Whether or not anything interesting is predicted, theoretically, from this remains to be seen. I don&#x27;t know off hand if it signals anything in particular, as the big ideas, like supersymmetry, are a bit removed from current collider experiments and aren&#x27;t necessarily tied to g-2 if I remember correctly. points 1 created 1617820197 dead false _id 59
REDIS REDIS RESULT -  0
REDIS REDIS RUN -  JSON.SET comment:59 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET comment:59 . '{"id":"oniALfvGXZIJ","by":"podiki","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"As a particle physicist (no longer working in the field, sadly), this is one of the more exciting results in a long time. Muon g-2 has been there, in some form of another for debate and model building, for many years (taken somewhat seriously for 15+?), waiting for better statistics and confirmation. At over 4 sigma this is much more compelling than it has ever been, and the best potential sign of new (non-Standard Model) physics.<p>I&#x27;m not current on what models people like to explain this result, but it has been factored in (or ignored if you didn&#x27;t trust it) in particle physics model building and phenomenology for years. This result makes it much more serious and something I imagine all new physics models (say for dark matter or other collider predictions or tensions in data) will be using.<p>Whether or not anything interesting is predicted, theoretically, from this remains to be seen. I don&#x27;t know off hand if it signals anything in particular, as the big ideas, like supersymmetry, are a bit removed from current collider experiments and aren&#x27;t necessarily tied to g-2 if I remember correctly.","points":1,"created":1617820197,"dead":false,"_id":59}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET comment:59 .
REDIS REDIS RESULT -  {"id":"oniALfvGXZIJ","by":"podiki","parentItemId":"mmA7goJNC1Is","parentItemTitle":"Particle mystery: physicists confirm the muon is more magnetic than predicted","isParent":true,"parentCommentId":"","children":[],"text":"As a particle physicist (no longer working in the field, sadly), this is one of the more exciting results in a long time. Muon g-2 has been there, in some form of another for debate and model building, for many years (taken somewhat seriously for 15+?), waiting for better statistics and confirmation. At over 4 sigma this is much more compelling than it has ever been, and the best potential sign of new (non-Standard Model) physics.<p>I&#x27;m not current on what models people like to explain this result, but it has been factored in (or ignored if you didn&#x27;t trust it) in particle physics model building and phenomenology for years. This result makes it much more serious and something I imagine all new physics models (say for dark matter or other collider predictions or tensions in data) will be using.<p>Whether or not anything interesting is predicted, theoretically, from this remains to be seen. I don&#x27;t know off hand if it signals anything in particular, as the big ideas, like supersymmetry, are a bit removed from current collider experiments and aren&#x27;t necessarily tied to g-2 if I remember correctly.","points":1,"created":1617820197,"dead":false,"_id":59}
REDIS REDIS RUN -  GET user:id-indicator
REDIS REDIS RESULT -  "78"
REDIS REDIS RUN -  INCR user:id-indicator
REDIS REDIS RESULT -  79
REDIS REDIS RUN -  HSET user:78 username moderator email  created 1618054796473 karma 0 about  showDead false isModerator true shadowBanned false banned false _id 78
REDIS REDIS RESULT -  10
REDIS REDIS RUN -  JSON.SET user:78 . [object Object]
REDIS REDIS RUN REFORMAT -  JSON.SET user:78 . '{"username":"moderator","password":"$2a$10$lnwnXq6OTc5D8rknt4GCf.VG1yZT9d8VMAxOrr60Q4APMD6nEJa9i","email":"","created":1618054796473,"karma":0,"about":"","showDead":false,"isModerator":true,"shadowBanned":false,"banned":false,"_id":78}'
REDIS REDIS RESULT -  null
REDIS REDIS RUN -  JSON.GET user:78 .
REDIS REDIS RESULT -  {"username":"moderator","password":"$2a$10$lnwnXq6OTc5D8rknt4GCf.VG1yZT9d8VMAxOrr60Q4APMD6nEJa9i","email":"","created":1618054796473,"karma":0,"about":"","showDead":false,"isModerator":true,"shadowBanned":false,"banned":false,"_id":78}

I am able to run query though

FT.INFO idx:user
 1) index_name
 2) idx:user
 3) index_options
 4) (empty array)
 5) index_definition
 6)  1) key_type
     2) HASH
     3) prefixes
     4) 1) user:
     5) language_field
     6) __language
     7) default_score
     8) "1"
     9) score_field
    10) __score
    11) payload_field
    12) __payload
 7) fields
 8)  1) 1) username
        2) type
        3) TEXT
        4) WEIGHT
        5) "1"
        6) SORTABLE
     2) 1) email
        2) type
        3) TEXT
        4) WEIGHT
        5) "1"
        6) SORTABLE
     3) 1) created
        2) type
        3) NUMERIC
        4) SORTABLE
     4) 1) karma
        2) type
        3) NUMERIC
        4) SORTABLE
     5) 1) about
        2) type
        3) TEXT
        4) WEIGHT
        5) "1"
     6) 1) showDead
        2) type
        3) TEXT
        4) WEIGHT
        5) "1"
     7) 1) isModerator
        2) type
        3) TEXT
        4) WEIGHT
        5) "1"
     8) 1) shadowBanned
        2) type
        3) TEXT
        4) WEIGHT
        5) "1"
     9) 1) banned
        2) type
        3) TEXT
        4) WEIGHT
        5) "1"
    10) 1) _id
        2) type
        3) TEXT
        4) WEIGHT
        5) "1"
        6) SORTABLE
 9) num_docs
10) "78"
11) max_doc_id
12) "79"
13) num_terms
14) "181"
15) num_records
16) "775"
17) inverted_sz_mb
18) "0.0044755935668945312"
19) total_inverted_index_blocks
20) "4069"
21) offset_vectors_sz_mb
22) "0.0007724761962890625"
23) doc_table_size_mb
24) "0.0066957473754882812"
25) sortable_values_size_mb
26) "0.0097818374633789062"
27) key_table_size_mb
28) "0.0017490386962890625"
29) records_per_doc_avg
30) "9.9358978271484375"
31) bytes_per_record_avg
32) "6.0554838180541992"
33) offsets_per_term_avg
34) "1.045161247253418"
35) offset_bits_per_record_avg
36) "8"
37) hash_indexing_failures
38) "0"
39) indexing
40) "0"
41) percent_indexed
42) "1"
43) gc_stats
44)  1) bytes_collected
     2) "0"
     3) total_ms_run
     4) "0"
     5) total_cycles
     6) "0"
     7) average_cycle_time_ms
     8) "-nan"
     9) last_run_time_ms
    10) "0"
    11) gc_numeric_trees_missed
    12) "0"
    13) gc_blocks_denied
    14) "0"
45) cursor_stats
46) 1) global_idle
    2) (integer) 0
    3) global_total
    4) (integer) 0
    5) index_capacity
    6) (integer) 128
    7) index_total
    8) (integer) 0
ajeetraina commented 3 years ago

@ITsolution-git Any update on this?

rajaraodv commented 3 years ago

@ITsolution-git Can you please take a look at this ASAP?

spurin commented 2 years ago

Still very interested in seeing this working pls @ITsolution-git