Exemplo n.º 1
0
        public List <RaceSearchResultDto> GetSearch(string query, DateTimeOffset?date)
        {
            var tokens  = tokenizer.GetTokens(query);
            var entries = racesIndexRepository.Search(tokens, date);

            return(entries.Select(BuildSearchResult).ToList());
        }
Exemplo n.º 2
0
 private RaceIndexEntry BuildIndexEntry(string raceId, RaceSettings raceSettings)
 {
     return(new RaceIndexEntry
     {
         RaceId = raceId,
         Name = raceSettings.Name,
         Start = raceSettings.Start,
         End = raceSettings.End,
         SearchTokens = tokenizer.GetTokens(raceSettings.Name)
     });
 }