OpenGenus / cosmos-search

:seedling: The next generation unbiased real-time privacy and user focused code search engine for everyone; Join us at https://discourse.opengenus.org/
http://search.opengenus.org
GNU General Public License v3.0
151 stars 75 forks source link

Voting feature for anonymous users #60

Open AdiChat opened 6 years ago

AdiChat commented 6 years ago

This is a:

Description:

Add a voting feature :star: that works for anonymous users.

For this, you may assign a voting to each category of codes in the meta-data. When a user votes for a particular search result, store the vote assigned along with the IP address of the user in a database. On displaying, calculate the average vote and display it.

This will provide a social feature and provide some interactivity. We will provide more social searching feature soon as the user profile and authentication system are ready. The anonymous social features will be permanent as everyone deserves to enjoy a good search. :+1:

Shweta4321 commented 6 years ago

I would like to work on this issue

AdiChat commented 6 years ago

@Shweta4321 Feel free to work on this feature. Keep us updated on your progress :+1:

Shweta4321 commented 6 years ago

@AdiChat What should be the key for different codes in database to store avg rating done by the user?

AdiChat commented 6 years ago

You may use the key in metadata.json as the key for the average_rating table. For instance, string_algorithms/src/kmp_algorithm may have an average rating.

Shweta4321 commented 6 years ago

@AdiChat review.