I'm creating a website which will collect posts from facebook's pages to show to the users posts they are interested in (as my graduating project).
I'd like to be able to rank the posts that contain the words which are queried. Hence, I use (solr)for full text indexing which allows me to effciently get the posts containing the words the user searches for.
Now, I am looking for a ranking function for returning most relevant search results first. But there are many variables which could influence the relevance and ranking of the post. I found these factors:
date of the post.
likes number of the post.
comments number of the post(not very correct).
is the published page verified ?
likes count for the published page.
location of the page and the user.
I need a formula to combine these factors, and I think that there is something missing - there must be a weighting for the search keywords themselves in the post. And maybe I am missing something more?
Is there any other way to determine relevance?
Some additional information:
- I think that there is an important factor I am not using. This factor should deal with the other keywords in the post and see if they are related to the major keyword.
Take, for example, these two posts:
I love sports.
I love basketball , football and all other sports and i think that they are very healthy.
Lets say these posts have the same above factors, but the second has more keywords in the required domain (sports). How to determine that the second post is more related to the "sports" domain?