Commit cdb9b2f2d3736b3a42854ff3bf96f2ca440bf25c
1 parent
c6f6be8b
Exists in
master
and in
21 other branches
Fixed most issues
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
lib/searchkick.rb
... | ... | @@ -88,13 +88,14 @@ module Searchkick |
88 | 88 | filter: ["standard", "lowercase", "asciifolding", "stop", "searchkick_shingle", "snowball", "searchkick_synonym"] |
89 | 89 | # filter: ["standard", "lowercase", "asciifolding", "stop", "snowball"] |
90 | 90 | }, |
91 | + # lucky find http://web.archiveorange.com/archive/v/AAfXfQ17f57FcRINsof7 | |
91 | 92 | searchkick2: { |
92 | 93 | type: "custom", |
93 | 94 | tokenizer: "standard", |
94 | 95 | # synonym should come last, after stemming and shingle |
95 | 96 | # shingle must come before snowball |
96 | 97 | # filter: ["standard", "lowercase", "asciifolding", "stop", "searchkick_shingle", "snowball", "searchkick_synonym"] |
97 | - filter: ["standard", "lowercase", "asciifolding", "stop", "snowball", "searchkick_synonym"] | |
98 | + filter: ["standard", "lowercase", "asciifolding", "stop", "searchkick_shingle2", "snowball", "searchkick_synonym"] | |
98 | 99 | } |
99 | 100 | }, |
100 | 101 | filter: { |
... | ... | @@ -102,6 +103,12 @@ module Searchkick |
102 | 103 | type: "shingle", |
103 | 104 | token_separator: "" |
104 | 105 | }, |
106 | + searchkick_shingle2: { | |
107 | + type: "shingle", | |
108 | + token_separator: "", | |
109 | + output_unigrams: false, | |
110 | + output_unigrams_if_no_shingles: true | |
111 | + }, | |
105 | 112 | searchkick_synonym: { |
106 | 113 | type: "synonym", |
107 | 114 | ignore_case: true, | ... | ... |