I want to add the functionality that can pop up the similar results with every search query the user input.
I would be using it locally, so no google haystack search or something.
I want to add the functionality that can pop up the similar results with every search query the user input.
I would be using it locally, so no google haystack search or something.
Not sure I follow: to get anything meaningful, especially as someone new to the language, you're going to need to use an external search package. If you're uncomfortable setting up something like Elasticsearch locally, you can start with Whoosh which can be installed with pip
. I would highly recommend using Haystack as it abstracts away what you use under the covers to make it friendlier to work with and allows you to swap out for something stronger than Whoosh in the future. Here's a list of back-ends: they all support the “More Like This” functionality. If you're insistent on not using Haystack, here's a previous answer about how to get started in Whoosh.