소스 검색

Fix search entries with " (...)" ranking less than intended

Thibaut Courouble 9 년 전
부모
커밋
046d4c1d94
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      assets/javascripts/app/searcher.coffee

+ 2 - 2
assets/javascripts/app/searcher.coffee

@@ -113,7 +113,7 @@ class app.Searcher
     fuzzy_min_length: 3
 
   SEPARATORS_REGEXP = /\:?\ |#|::|->|\$(?=\w)/g
-  INFO_PARANTHESES_REGEXP = /\(\w+?\)$/
+  INFO_PARANTHESES_REGEXP = /\ \(\w+?\)$/
   EMPTY_PARANTHESES_REGEXP = /\(\)/
   EVENT_REGEXP = /\ event$/
   DOT_REGEXP = /\.+/g
@@ -128,9 +128,9 @@ class app.Searcher
       .toLowerCase()
       .replace ELLIPSIS, EMPTY_STRING
       .replace EVENT_REGEXP, EMPTY_STRING
+      .replace INFO_PARANTHESES_REGEXP, EMPTY_STRING
       .replace SEPARATORS_REGEXP, SEPARATOR
       .replace DOT_REGEXP, SEPARATOR
-      .replace INFO_PARANTHESES_REGEXP, EMPTY_STRING
       .replace EMPTY_PARANTHESES_REGEXP, EMPTY_STRING
       .replace WHITESPACE_REGEXP, EMPTY_STRING