Reindex required when es-node is restarted #369
Replies: 6 comments
-
No, you don't need to re-index. The hyperplanes are defined as a function of a random seed that's stored in the mapping. |
Beta Was this translation helpful? Give feedback.
-
You are right! |
Beta Was this translation helpful? Give feedback.
-
The actual hyperplanes are not stored. We use a fixed seed (0), provide it to a random number generator, and then use the generator to the hyperplanes at runtme.
The reason for using the loading cache is to avoid re-generating the hyperplanes on every search request. I'm guessing you want to retrieve the actual hyperplanes? Right now they're not stored in the mapping. There's one thing you could try: you could use the models library to generate an LSH model. As long as you provide the same seed (0) and the same paramaters (L, k, etc), then the hyperplanes will be the same. If you can provide some more details on what you're doing, I might be able to offer more ideas. |
Beta Was this translation helpful? Give feedback.
-
I never thought that the same seed (0) and the same parameters (L, k, etc) will always lead to the same result...
I am intended to leverage your talented code to speed up our recall of the product search engine. Again, your work is really impressive and thanks :) |
Beta Was this translation helpful? Give feedback.
-
If you are using Elasticsearch, you can just install the plugin. You don't have to copy/rewrite any code. Installation instructions are here: http://localhost:4000/installation/ I'm happy to hear it's helping. I forgot to mention there is more info about how hyperplanes and models in general are stored here: https://elastiknn.com/api/#nice-to-know |
Beta Was this translation helpful? Give feedback.
-
I'll go ahead and close this since the original issue/question is resolved. Feel free to open another issue or post on the Gitter if you have more questions: https://gitter.im/elastiknn/community |
Beta Was this translation helpful? Give feedback.
-
If i didn't understand it wrong, reindex required when es-node is restarted for the the hyperPlanes in AngularLshModel is regenerated.
Beta Was this translation helpful? Give feedback.
All reactions