I am developing an app in which I get data in a class from the net. Class is
public class extension {public string name {get; Set; } Public listing & lt; Education & gt; Education {receives; Set; } Get public city city { Set; } Public listing & lt; Work & gt; Work {received; Set; }} Public class education {public string DegriName {get; Set; }} Public square City {public string name {get; Set; }} Public class work {public string name {get} Set; }} Data is stored for any person in the above category.
Now I want to search for a string q = "Which manager was graduated from USA?" So I asked the above question I want to search ...
How many words match, I want to give the name of the user. So what are the people looking for if he has been graduated from a manager in the United States? (There may be fewer terms for search like like director of India ) approach manager in work I search for and graduation for education and location USA Creating an array of strings
string [] qList = q.Split (''); And then go through the class. But I have no idea how to look for data in the classroom (efficiently).
And is my view enough to search or is there a better option?
What you are developing is a human readable and writeable query language. Start with string split, okay, start, but imagine the possibilities of search: search for people in a city or city, search for those who work for the top 500 companies or are certain In area.
You should develop a query language for this purpose, with a look and a look at the Parser Generator that works well with C # / .net, with simplifying grammar documents.
Comments
Post a Comment