Making Filtered Search Feature in a search engine based app

Hello everyone, I need urgent help. I have made a search engine based app that reads from csv file to recruit info. I also added the "filters" search feature but it's not working. PLEASE HELP I NEED THIS FIXED ASAP :frowning:


(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.

export_and_upload_aia

.

This is an assignment and project that has a very big percentage of my course grade. So, I'm a bit hesitant about uploading my aia file in here in public. I'll upload it temporarily and delete it.

Let's start by making your data base and blocks more visible for the board members.

Data sample:

Dentistry,Dr. Sriganesh Vikram,Bowsher Dental Clinic,Male,"71581414, 93948316",24230003,NONE,NONE,Bowsher,https://www.bowsherdental.com/,info@bowsherdental.com,https://www.instagram.com/bowsher_dental,"Dr. Sriganesh Vikram has an experience of 18 years in the field of orthodontics. He began rendering quality treatment with utmost care such that patient satisfaction was the prime criterion. He has worked in the best hospitals and this has improved his expertise in clinical dentistry and Orthodontics. He began his career at the biggest hospital in India, Apollo Hospital main branch, Chennai and worked in Fortis Hospital, Chennai. Later he was promoted as the Head of the Department in Orthodontics. He has trained many students and they are successfully practising Orthodontics. He has treated more than 2000 patients spanning in his 18 year career in Orthodontics.",ExpertImage1.jpeg,24230003,93948316
Dentistry,Dr. Murhaf Hamameh,Elite Modern Medical CenterÊ,Male,91000391,24283761,"English, Arabic",NONE,Seeb,NONE,NONE,https://www.instagram.com/eliteclinicoman,Specialised in general dentistry,ExpertImage2.jpeg,24283761,91000391
Dentistry,Dr. Rohan JohnÊ,Elite Modern Medical Center,NONE,91000391,24283761,"English, Arabic, Hindi",NONE,Seeb,NONE,NONE,https://www.instagram.com/eliteclinicoman,Specialised in orthodontics,NONE,24283761,91000391
Dentistry,Dr. Thuraiya Al Abri,Elite Modern Medical Center,Female,91000391,24283761,"English, Arabic",NONE,Seeb,NONE,NONE,https://www.instagram.com/eliteclinicoman,Specialised in general dentistry,NONE,24283761,91000391
Dentistry,Dr. Muna QashqashÊ,Elite Modern Medical Center,Female,91000391,24283761,"English, Arabic",NONE,Seeb,NONE,NONE,https://www.instagram.com/eliteclinicoman,Specialised in periodontics,NONE,24283761,91000391
Dentistry,Dr. Zinah ZohairÊ,Elite Modern Medical Center,NONE,91000391,24283761,NONE,NONE,Seeb,NONE,NONE,https://www.instagram.com/eliteclinicoman,Specialised in orthodontics,NONE,24283761,91000391
Dentistry,Dr Siju GeorgeÊ,Wassan Dental Specialty Center,NONE,NONE,24489469,"English, Arabic, Hindi, Malayalam",NONE,Al Khuwair,NONE,NONE,https://www.instagram.com/wassandental,Specialised in orthodontics,NONE,24489469,NONE
Dentistry,Dr Sheby PouloseÊ,Wassan Dental Specialty Center,NONE,NONE,24489469,"English, Arabic, Hindi, Malayalam",NONE,Al Khuwair,NONE,NONE,https://www.instagram.com/wassandental,Specialised in cosmetic dentistry,NONE,24489469,NONE
Dentistry,Dr Aamina FarookÊ,Wassan Dental Specialty Center,NONE,NONE,24489469,"English, Hindi",NONE,Al Khuwair,NONE,NONE,https://www.instagram.com/wassandental,Specialised in conservative dentistry,NONE,24489469,NONE
Dentistry,Dr Puneet Soratur,Wassan Dental Specialty Center,NONE,NONE,24489469,"English, Hindi",NONE,Al Khuwair,NONE,NONE,https://www.instagram.com/wassandental,Specialised in general dentistry,NONE,24489469,NONE
Dentistry,Dr Vijaylakshmi Sundarraj,Wassan Dental Specialty Center,NONE,NONE,24489469,English,NONE,Al Khuwair,NONE,NONE,https://www.instagram.com/wassandental,Specialised in general dentistry,NONE,24489469,NONE
Dentistry,Dr Dinesh GopalÊ,Wassan Dental Specialty Center,NONE,NONE,24489469,"ÊEnglish, Malayalam",NONE,Al Khuwair,NONE,NONE,https://www.instagram.com/wassandental,Specialised in oral and maxillofacial surgery,NONE,24489469,NONE

This code section looks fishy:

Could you explain what data is in FilterSelected?

And why is an AND being used instead of, perhaps, an OR?

1 Like

FilterSelected refer to every checkbox that has been checked
The use of AND means that if the user checked a certain location, spoken languages, department (those are examples of my filtering options) then those exact requirements must be found, read and displayed from the csv file. If I used OR, then what I assume will happen that either the selected location, spoken languages or department will be looked for and not all together. Again, this is the entire point of a filtered search.

I did a quick test, and nothing crashed.
Sample run

Look at the Do It values in your search criteria.

Are your results too loose, or too tight?

And your list of criteria is not differentiated well by category.

Wouldn't you want each category to have its own list of acceptable values?

From your sample run,
image

how would you expect the filter to work?

Must each returned specialist be both a Dermatologist and a Mental Health specialist?

Or is it okay to look for just Dermatologists and Mental Health specialists, so if you can't fix your skin at least you have some one who can make you feel better about it?

I would rethink the logic of the search through the specialist table.

Each column of the table that gives a value for a search criterion (Specialty, Location, Gender,...) should provide a pass/fail decision for that column.

Only records that don't fail any column should be returned.

Like any other filtered search feature, if they click on both dermatology and mental health specialists, then all the corresponding specialists will show as a result. However what is happening is that even those unchecked checkboxes like dentists show up as well. This is my issue. WHEN THE SPECIFIC checkbox is checked, then the results should ONLY show what was chosen.

How do I do that? the pass/fail decision you mean in relevance to the checkboxes?

I know it's not crashing but my issue is the filters feature is not working.
Too loose I would say.

Do you see how whatever is written in the textbox corresponds to the results? I wanna do that with the filters as well, whenever I check mental specialists for example, it doesn't only show mental specialists but it shows the entire list of specialists.

What do you mean by list of criteria is not differentiated well by category?

You have 4 categories:

  • Specialty
  • Location
  • Language
  • Gender

II will assume if nothing is checked in a category, then anything in that category can be assumed to match.

Make 4 value procedures (true/false functions):

  • matches_Specialty
  • matches_Location
  • matches_Language
  • matches_Gender

Each specialist must pass a 4-way AND of those t/f functions to pass.

Each function should be given 2 arguments:

  • possibly empty list of acceptable filter values in that category
  • possibly empty list of this specialists' capabilities in this category

(Be careful, your table has CSV entries for some specialists with multiple locations or specialties or Genders, so you would need to split at comma to get lists)

The return value should be

  • if filter list is empty then true
    • else if specialists' capabilities list is empty then true (not sure about this part)
    • else return Intersects(the two lists) is not empty
1 Like


This is where I'm at now. I need help writing the code:

  1. When the filter is valid (any filters checkbox is checked), here I only put three departments for trial purposes.
  2. MATCH THE selected checkbox department to index number 1 from the civ file which is called Expertslist but I made a variable called Output Info List which means the output that will be displayed once the apply/search button is clicked.

I NEEED HELP PLEASE IMPLEMENTING THIS BECAUSE MY ASSIGNMENT IS DUE AT THE END OF THE WEEK.

SHOUTING (typing in CAPITALS) is considered rude, please don't.

1 Like

that clearly wasn't my intention, I only wanted to show my frustration over the code. Plus, where did you come from? if you can't help why govern my feelings over the code I'm been trying to to make over the past weeks or so for a very important course in my uni? excuse me?

this where I'm at now and I still cannot make it work:( it keeps showing me nothing matched.


please check my latest update on how I wrote the code and let me know what do you think I've done wrong :frowning:

Btw, a quick tip if you are posting to forums, make sure not to type in caps lock, this is an etiquette. Nobody would want to help if you type with caps...
This is on almost all internet forums, not just here...

That is an extermely harsh question towards anybody, not just him or us...

Next time try to avoid typing in caps, I guess you could make the text bold if you want to show frustration...

I never typed in caps, only in two statements from all of the statements I've posted and the content itself wasn't even meant to offend anyone, it was about me, my feelings. Regarding etiquette, I am new to this, I have never joined any internet forums in my life, I am used to using twitter only which is very informal and literally no one gets offended by capital letters. but that's good to know now, there'a first time to everything.

1 Like