prmr / Creco

Recommendation System for Consumer Products
Apache License 2.0
6 stars 2 forks source link

Limiting the number of products displayed after a search #76

Closed mangalagb closed 10 years ago

mangalagb commented 10 years ago

As of now, when a category is searched and its match is found, all the products in that category is displayed. For example, when a user searches for Laptop, all the Laptops are listed (more than a hundred I think) as a huge list which makes it extremely inconvenient to browse. There could be two ways around this: We develop a strategy by which only a few of these items are displayed initially (before the user tweaks the features). Possible ways include sorting by ratings(among the ones that are rated), price etc.

mangalagb commented 10 years ago

Since the above comment is UI related and there is already an issue about this, I'l delete this issue.

enewe101 commented 10 years ago

Hey @mangalagb , this issue is assigned to you so I was wondering if you're still working on it.

If so, I just wanted to point out that how the product list is truncated might interact with the display of graphs and other info on the front-end. Ideally, the truncation of products would be implemented behind the service facade. (If anyone disagrees, please do post). It would be important not to implement it on the front end, because that will make the layout and graph logic unnecessarily intensive.

Could you post a brief update if you are working on this?

mangalagb commented 10 years ago

The changes I make should not interfere with other parts. I simply access the overallscore of the products for the ones that have them and sort them. Then I return the top 20 from this list. The method that used to be called returnProductsalphabetically has been modified to reflect the change.

The code for this is present in branch limitProducts. While I was testing this branch, I found no interference with other parts. I'm waiting for the autocomplete issue to finish before I push changes into master.

asutcl commented 10 years ago

I think we need to limit the amount of products returned for any ranked product list. Also I thought we were moving away from the alphabetical sort and we were going to go with a sort by overall rating. As discussed in

111, this could be done by simply passing a max value for the overall

score weight and zero values everywhere else.

This probably should be coordinate with @forgues since he will update the product ranking algorithm.

On 17 April 2014 15:49, mangalagb notifications@github.com wrote:

The changes I make should not interfere with other parts. I simply access the overallscore of the products for the ones that have them and sort them. Then I return the top 20 from this list. The method that used to be called returnProductsalphabetically has been modified to reflect the change.

The code for this is present in branch limitProducts. While I was testing this branch, I found no interference with other parts. I'm waiting for the autocomplete issue to finish before I push changes into master.

— Reply to this email directly or view it on GitHubhttps://github.com/prmr/Creco/issues/76#issuecomment-40755135 .

forgues commented 10 years ago

I don't think this change should interfere with the product ranking algorithm, since the ranking algorithm will always consider all products in the search space. Once the entire list of products has been ranked and sorted, then we can crop the list and send only the top K products to the UI. This would probably be done in the service facade.

mangalagb commented 10 years ago

I have merged changes (only for the initial view). Can somebody take a look? I ran all the tests and found no issues.

asutcl commented 10 years ago

I changed it a bit to work for all the views since I have working with that code a bit recently I realized it had to be limited in the JS because the graph require all the items to display the rankings by attribute. I think this can be closed now.