I want to build a large document (news article) searchable database, such as when adding a new article I will be able to quickly find X most similar articles from it. What is the right tech/algorithm/Python framework to approach this?
1 Answer
Elasticsearch is the right tool to use if you don't want to code this yourself. Indeed, you need an indexing algorithm that is able to efficiently retrieve pieces of texts in a big database, and SQL isn't particularly good at it. Moreover, Elasticsearch is quite user friendly, so it won't be an overkill to actually install it and use it. You might discover in the process that finding most similar articles isn't that easy and that Elasticsearch is of a great.
Here is the documentation for a Python client:
-
$\begingroup$ I agree. It did look like a similarity problem at first, but its an indexing nightmare when you get to it. And - elasticsearch seems to be the right solution in a number of aspects. $\endgroup$– rubmzNov 8, 2017 at 9:59
-
$\begingroup$ Yes, getting the similarity is the simplest part of information retrieval in general, all the processes before are the real burden. $\endgroup$– RobinNov 10, 2017 at 15:42
more_like_this
that will give you the most similar documents to the one passed to it. Docs $\endgroup$