Open spurin opened 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
@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'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://news.ycombinator.com/item?id=26699106&p=2" rel="nofollow">https://news.ycombinator.com/item?id=26699106&p=2</a><p><a href="https://news.ycombinator.com/item?id=26699106&p=3" rel="nofollow">https://news.ycombinator.com/item?id=26699106&p=3</a><p>(If you'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'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://news.ycombinator.com/item?id=26699106&p=2\" rel=\"nofollow\">https://news.ycombinator.com/item?id=26699106&p=2</a><p><a href=\"https://news.ycombinator.com/item?id=26699106&p=3\" rel=\"nofollow\">https://news.ycombinator.com/item?id=26699106&p=3</a><p>(If you'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'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://news.ycombinator.com/item?id=26699106&p=2\" rel=\"nofollow\">https://news.ycombinator.com/item?id=26699106&p=2</a><p><a href=\"https://news.ycombinator.com/item?id=26699106&p=3\" rel=\"nofollow\">https://news.ycombinator.com/item?id=26699106&p=3</a><p>(If you'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'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://news.ycombinator.com/item?id=26699106&p=2" rel="nofollow">https://news.ycombinator.com/item?id=26699106&p=2</a><p><a href="https://news.ycombinator.com/item?id=26699106&p=3" rel="nofollow">https://news.ycombinator.com/item?id=26699106&p=3</a><p>(If you'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'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://news.ycombinator.com/item?id=26699106&p=2\" rel=\"nofollow\">https://news.ycombinator.com/item?id=26699106&p=2</a><p><a href=\"https://news.ycombinator.com/item?id=26699106&p=3\" rel=\"nofollow\">https://news.ycombinator.com/item?id=26699106&p=3</a><p>(If you'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'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://news.ycombinator.com/item?id=26699106&p=2\" rel=\"nofollow\">https://news.ycombinator.com/item?id=26699106&p=2</a><p><a href=\"https://news.ycombinator.com/item?id=26699106&p=3\" rel=\"nofollow\">https://news.ycombinator.com/item?id=26699106&p=3</a><p>(If you'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's not as decisive as I'm noticing some headlines (and commenters) are claiming.<p>One of the big open questions is "are APIs copyrightable?" The court skirted that question, and instead focused on whether it was fair use:<p>> 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're in fair use territory:<p>> 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'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's not as decisive as I'm noticing some headlines (and commenters) are claiming.<p>One of the big open questions is "are APIs copyrightable?" The court skirted that question, and instead focused on whether it was fair use:<p>> 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're in fair use territory:<p>> 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'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's not as decisive as I'm noticing some headlines (and commenters) are claiming.<p>One of the big open questions is "are APIs copyrightable?" The court skirted that question, and instead focused on whether it was fair use:<p>> 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're in fair use territory:<p>> 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'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's not as decisive as I'm noticing some headlines (and commenters) are claiming.<p>One of the big open questions is "are APIs copyrightable?" The court skirted that question, and instead focused on whether it was fair use:<p>> 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're in fair use territory:<p>> 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'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's not as decisive as I'm noticing some headlines (and commenters) are claiming.<p>One of the big open questions is "are APIs copyrightable?" The court skirted that question, and instead focused on whether it was fair use:<p>> 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're in fair use territory:<p>> 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'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's not as decisive as I'm noticing some headlines (and commenters) are claiming.<p>One of the big open questions is "are APIs copyrightable?" The court skirted that question, and instead focused on whether it was fair use:<p>> 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're in fair use territory:<p>> 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'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 > "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."<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":"> "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."<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":"> "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."<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 > "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."<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":"> "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."<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":"> "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."<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'
@spurin Did you manage to get it working?
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
@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/Gmail/Google/Amazon/LinkedIn/Tinder/whoever asks me to give them phone number "just in case" my first and only thought is "hell no". I haven'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/Gmail/Google/Amazon/LinkedIn/Tinder/whoever asks me to give them phone number "just in case" my first and only thought is "hell no". I haven'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/Gmail/Google/Amazon/LinkedIn/Tinder/whoever asks me to give them phone number "just in case" my first and only thought is "hell no". I haven'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://www.quantamagazine.org/muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407" rel="nofollow">https://www.quantamagazine.org/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://www.quantamagazine.org/muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407\" rel=\"nofollow\">https://www.quantamagazine.org/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://www.quantamagazine.org/muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407\" rel=\"nofollow\">https://www.quantamagazine.org/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://www.quantamagazine.org/muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407" rel="nofollow">https://www.quantamagazine.org/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://www.quantamagazine.org/muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407\" rel=\"nofollow\">https://www.quantamagazine.org/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://www.quantamagazine.org/muon-g-2-experiment-at-fermilab-finds-hint-of-new-particles-20210407\" rel=\"nofollow\">https://www.quantamagazine.org/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'm not current on what models people like to explain this result, but it has been factored in (or ignored if you didn'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'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'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'm not current on what models people like to explain this result, but it has been factored in (or ignored if you didn'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'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'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'm not current on what models people like to explain this result, but it has been factored in (or ignored if you didn'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'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'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'm not current on what models people like to explain this result, but it has been factored in (or ignored if you didn'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'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'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'm not current on what models people like to explain this result, but it has been factored in (or ignored if you didn'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'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'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'm not current on what models people like to explain this result, but it has been factored in (or ignored if you didn'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'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'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
@ITsolution-git Any update on this?
@ITsolution-git Can you please take a look at this ASAP?
Still very interested in seeing this working pls @ITsolution-git
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 -
My .env file is as follows -
I'm then trying to start up the app through a simple docker container that I plan on refactoring later -
On startup I get the following -
If I browse to localhost:5000 at this stage, I see -
If I try and load the seed data, I get the following with WRONGTYPE for all of the attempts -
Any pointers you can help me with please?