Skip to content
This repository
Browse code

* Do not split search term on dots and dashes

  • Loading branch information...
commit 08cecf6b8601c55065eb365204162f8eed4ae857 1 parent 3a7bc73
Pranav K authored September 05, 2012
3  Website/Infrastructure/Lucene/LuceneSearchService.cs
@@ -85,6 +85,7 @@ private static IList<int> SearchCore(SearchFilter searchFilter, out int totalHit
85 85
                 var keys = results.scoreDocs.Skip(searchFilter.Skip)
86 86
                                             .Select(c => ParseKey(searcher.Doc(c.doc).Get("Key")))
87 87
                                             .ToList();
  88
+
88 89
                 totalHits = results.totalHits;
89 90
                 searcher.Close();
90 91
                 return keys;
@@ -148,7 +149,7 @@ private static Query ParseQuery(SearchFilter searchFilter)
148 149
 
149 150
         private static IEnumerable<string> GetSearchTerms(string searchTerm)
150 151
         {
151  
-            return searchTerm.Split(new[] { ' ', '.', '-' }, StringSplitOptions.RemoveEmptyEntries)
  152
+            return searchTerm.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
152 153
                              .Concat(new[] { searchTerm })
153 154
                              .Distinct(StringComparer.OrdinalIgnoreCase)
154 155
                              .Select(Escape);

0 notes on commit 08cecf6

Please sign in to comment.
Something went wrong with that request. Please try again.