u4819210 / social-networks-for-fun

Automatically exported from code.google.com/p/social-networks-for-fun
0 stars 0 forks source link

About adding Nationality to categorize restaurant #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Wei needs to define an API to get all existing nations from db, then Hua 
display a nations list to let user choose which national restaurants to 
display. 

Original issue reported on code.google.com by jt.xion...@gmail.com on 9 Aug 2010 at 7:01

GoogleCodeExporter commented 8 years ago
 In elgg_restaurant_info table, there is currently a "Category" field
 instead of nationality we previously proposed. For example, for a korean
 restaurant, its category field may have this kind of string "Restaurants,
 Korean Restaurants, Pan Asian Restaurants, Family Restaurants". At one
 hand it made us a little difficult to categorize restaurants by
 nationality, but at the other hand it makes easier for searching to work
 if we have a search box at top.

 So in the API to categorize restaurants, it needs to do some parsing
 first, we can have an all-nation list first like {korean, thai, chinese,
 american, russian,...}, during the parsing "Category" value for each
 restaurant, if we found a sub-string belong to this list, then take it out
 and put in another new list. Frontend will only need to display this new
 list.

 We also put a search box at top. If user prefer searching a restaurant,
 then another API searches restaurants by comparing their "Category" value
 with searching words.

Original comment by jt.xion...@gmail.com on 23 Aug 2010 at 10:08

GoogleCodeExporter commented 8 years ago
Parse the category string for nation may be influence the performance if there 
are a quantity of restaurant records in this table.

Original comment by xianhao.lv@gmail.com on 26 Aug 2010 at 3:56

GoogleCodeExporter commented 8 years ago
One way to resolve this is to write a small program separately to update that 
column, to only include nations, we don't need other string.

Original comment by jt.xion...@gmail.com on 26 Aug 2010 at 6:49