Closed Rishabh-malhotraa closed 2 years ago
Hey Can I work on this ?
Hey Can I work on this ?
Sure, that would be great!
Also don't forget to add debouncing to the text field in the front end.
As for mock data you need to create a Mongo db database with name Vita and uncomment the fake-data endpoint in the routes folder and visit that end point to add data, or you can just copy the code written in that file and run that script using node
Mentor cards are not coming when running on local machine, Is there any issue?
You need to download mongo db community server and mongodb compass, create a Collections called Vita
npm run dev
https://localhost:5000/api/data
on chrome URLhttps://localhost:5000/api/topicData
@parthn2 I have included the exported dump files of the data, so you could just follow this guide here
@parthn2 I have included the exported dump files of the data, so you could just follow this guide here
I am working on mac. So, the 3rd step(PATH) was different and So I tried with some article but still getting error. Mongo is installed in my system I am getting this error: Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused So, by trying to solve this I got one more issue and so on after that i tried to start the process from the start. I tried to delete the files and some were deleted and some not so I am not able to install again and it is messed up 😔
Make sure that you have MongoDB server is running before trying to connect to the database
brew services start mongodb-community
You can read more here
Finally Got done with the setup, would start the work now 😀 You can add this video as reference for mac setup. It was very helpful. https://www.youtube.com/watch?v=MzdhVBBFsdI
Great! I'll add the link to the installation guide for mac users.
I would like to work on this issue under GSSOC`22. Please assign it to me.
Hello, this is not an easy issue. Would you like to tell me how you plan to solve this issue, before assigning it to you. Thank you!
My plan is to define a text index on the Mentor model, which will allow text search on documents, I assume to receive a string from the client, and the search will be performed, and matching docs will be returned.
@Gurdeep475 perfect, that's what required.
You can set up with database with the mock data that are provided.
Let's break the Task into two-part, first, let's make the backend API for it, and then we would incorporate it with the frontend-- I would like to add debouncing and autosuggestion/completion on the frontend once we have the API built
database setup is ready, what's the next step?
and please assign this issue to me under GSSOC`22.
create a text index on the mentor model
you create API endpoint /fts?metorSearchText=text
you do a Full-text Search by extracting text from the query parameter mentorSearchText
field and then return all the mentors in JSON format.
[
...mentorsRetrievedfromDatatbase
]
Don't think about the front-end right now. Just think about making the API and validate your API-endpoint using postman to check if you get a proper response back.
@Rishabh-malhotraa I would like to discuss the weights for the fields for the FTS search. I have included the following relevant fields: first_name, last_name, job_title, company, description, expertise, language. which field according to you should have more weight?
@Gurdeep475, I don't really have an opinion on it; what do you think is the best way to go about this?
I think expertise should have highest weight, followed by job title, company, description, rest fields will be given 1 weight.
@Rishabh-malhotraa I have done most of the work but need guidance on Unit Test and CI-CD script part.
Can you please assign me thi issue under GSSOC'22
I think expertise should have highest weight, followed by job title, company, description, rest fields will be given 1 weight.
I like this, but can you code it in a way so that we can change the weights later on.
I would like to test the API with some test cases to see how well it works with different weights?
We can leave the unit test, for now, try testing it manually by making requests through postman and checking if you are getting the correct response, after that, we will formally write some unite tests using jest
You can see these videos to get an idea of what CI/CD Pipelines are
https://www.youtube.com/watch?v=scEDHsr3APg
Can you please assign me thi issue under GSSOC'22
Hey @MaitriDA it's been worked on by @Gurdeep475 do you mind working on something else thanks.
I like this, but can you code it in a way so that we can change the weights later on.
Manually Tested the API, the response looks good to me.
Manually Tested the API, the response looks good to me.
Looks good to mee too
I really want to make sure we write a unit test for this too. Would you like to do it, or should I create an issue so someone else can complete it once this PR gets Merged.
For backend end mocha/jasmine work better than jest which is more focused for front end testing
Mocha and Jasmine are stronger for testing the back end because they were initially built for Node applications; therefore, they have more back-end tools and documentation available than Jest.
I really want to make sure we write a unit test for this too. Would you like to do it, or should I create an issue so someone else can complete it once this PR gets Merged
I would let you tonight before 12:AM.
I will mark the PR final, regarding unit testing and CI/CD you can make a separate issue.
Use FTS-search provided by MongoDB to search a mentor by name company, year of graduation, etc.