I require help on how I should approach a project and would rather get the correct advice from the start rather than getting half way down the road and having to make a U-Turn.
The App I am making (using Ionic / (AngularJS) and Parse) that will be a search engine for Exercises. The current Exercise Dataset stands at over 4000 and will continue to grow. In order for a user to find the exercises they want there are going to be two methods to search:
Text search for the exerciseTitle
by using the Angular ng-filter
. Currently this is working really well.
The user selecting filters as they would on Amazon where they select Electronics > Camera > Accessories > Cases for example. As they check filters then they are added to the search and the search results are narrowed down. This is used because many exercises are given different names so a number of Tags / filters can narrow things down considerably and the user can find things without necessarily knowing the exact exerciseTitle
.
I have this working in the app currently, by pushing the filter name to an array and then filtering the data with that array of words.
I are in the process of editing our dataset and would like to ensure that it can be as 'searchable' and 'filterable' as possible. One suggestion is to have tags
on each exercise. For example the Exercise 'Squat' might have the following taxonomies and tags.
Body Part "Legs","Lower Body","Quadriceps"
Exercise Type "Strength","Standing", "Weighted"
Equipment "Dumbell"
A typical exercise is structured like this in JSON.
{[
"exerciseTitle":"Walking Lunge with Resistance Band Above Head",
"exId" : "23jhgb56ha",
"originalId" : "12",
"masterImage" : "31",
"images" : ["31","32","33"],
"description" : "Holding the resistance band above your head take a step forward from the standing position and drop the knee of the rear leg down to the floor",
"primaryMuscleGroup" : "Quadriceps",
"secondaryMuscleGroup" : "Glutes",
"equipment" : "Resistance Band",
"functionalMovement" : "Lunge",
"relatedExercises" : ["23","25"],
]}
Question 1. When adding tags to the dataset should I separate them into taxonomies and tags or can I just add a array of tags that relate to that exercise.
Question 2. How can I filter by only the tags within a certain taxonomy in AngularJS.
Question 3. Any suggestions on how you would approach this project in order to ensure that the Search is 100% perfect and a user is able to find even the most complex exercise in the system.
Many thanks
i have on my blog a sample how custom filters works over multiple properties with a sample fiddle.
http://andreaskarz.blogspot.ch/2014/03/mehrere-filter-auf-ng-repeat-anwenden.html
1,2,3 I would add tags as a separate fields in JSON so there would be no need to go through the inner array every time (it will be slightly faster)
I would also consider making search on database not on client. If your data set is so big, sooner or later you will encounter performance issues. Also this search can result in paged object so you will have no more than 100 results on site. Remember that 90% of ppl are looking for first 10 results.