I have a list of strings (a List<String> ) that can contain from 1 to 6 entries. What I want to do is use this list of strings for the search, but I want the possible searches to use any combination of two or more of these strings for the search. I used Dictionary<List<String>, String> currently.
ex. Suppose my list contains the following: fire, aero, thunder, water, blizzard, and I have the following entries in the dictionary:
List<String>(){"fire", "aero"}, "searing wind" List<String>(){"fire", "aero", "thunder"} "firestorm" List<String>(){"aero", "thunder"}, "storm" List<String>(){"aero", "water", "blizzard"}, "snowstorm" List<String>(){"aerora", "blizzara"}, "hailstorm"
I want the search to return the first 4 records, since my base list contains all the values ββneeded to find them. I also need to know what values ββwere used for the search, since these values ββwill need to be cleared from the base list later. The number of entries in the dictionary is likely to be ~ 400
I can think of an exhaustive way to do this search, but since the fact that order will matter when doing the search, it will take time to do all the permutations and find them. I could activate the alphabetical order in the dictionary keyword lists, if that helps. Does anyone know a better way to do this, or perhaps another, more efficient way to do this? I already use sqlite for some other things in this program, so if this allows me to find faster, I could use this.
thanks