ninjanye / SearchExtensions

Library of IQueryable extension methods to perform searching
MIT License
331 stars 52 forks source link

Searching by empty string throws ArgumentNullException #10

Closed siderisltd closed 8 years ago

siderisltd commented 8 years ago

Searching by empty string :

        var resultsInTitles = this.repo
                                  .All()
                                  .Search(x => x.Title.ToLower())
                                  .Containing(query.ToLower())
                                  .ToRanked()
                                  .OrderByDescending(r => r.Hits);

If query is "" : Actual -> Throws

Expected -> Return all results

ninjanye commented 8 years ago

Thanks for reading an issue @siderisltd. I'll fix this up in the next day or so