I am looking for a super simple and very pragmatic approach to k-means clustering of questions using PostgreSQL database alone.
While I am fully aware that this method may not yield meaningful results if my assumptions are off, it may be a good and first attempt at categorizing my data.
Imagine a small online forum, where users are free to ask brief questions about ANY topic they want but without the need to categorize them, and other users need to be notified about a new question if it matches the topics of interest to which they have previously subscribed.
My plan is to first break down each incoming question into lexemes using to_tsvector
but in all honesty I am a bit lost about what to do afterwards.
Even assuming I have correctly identified the k categories to which the question may be matched, how would I go about deciding whether a questions should fall into one (or more) category?