Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Do not split search term on dots and dashes

  • Loading branch information...
commit 08cecf6b8601c55065eb365204162f8eed4ae857 1 parent 3a7bc73
@pranavkm pranavkm authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  Website/Infrastructure/Lucene/LuceneSearchService.cs
View
3  Website/Infrastructure/Lucene/LuceneSearchService.cs
@@ -85,6 +85,7 @@ private static IList<int> SearchCore(SearchFilter searchFilter, out int totalHit
var keys = results.scoreDocs.Skip(searchFilter.Skip)
.Select(c => ParseKey(searcher.Doc(c.doc).Get("Key")))
.ToList();
+
totalHits = results.totalHits;
searcher.Close();
return keys;
@@ -148,7 +149,7 @@ private static Query ParseQuery(SearchFilter searchFilter)
private static IEnumerable<string> GetSearchTerms(string searchTerm)
{
- return searchTerm.Split(new[] { ' ', '.', '-' }, StringSplitOptions.RemoveEmptyEntries)
+ return searchTerm.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
.Concat(new[] { searchTerm })
.Distinct(StringComparer.OrdinalIgnoreCase)
.Select(Escape);
Please sign in to comment.
Something went wrong with that request. Please try again.