I am creating a sort of forum, and would like to create a function that gives the user suggestions for similar posts before posting a new post, just like in SO. I am not sure how to create this function in the most efficient way?
What will be the parameters to determine a similar post? This needs to be searched by the title of the post only, but still not sure what would be the logic behind it.
Also, I am working with cloud Firestore and I am charged by reads, so that logic needs to be efficient in terms of not needing to read every document in my database to bring up the relevant posts. Should be some smart query.
Would appreciate input and advice on that, thanks!
** Tried to google that many times but the search query brings up unrelated results ("how to create similar posts"). So if there's information out there about that I'd love a link too, couldn't find it myself.