Commit cdb9b2f2d3736b3a42854ff3bf96f2ca440bf25c

Authored by Andrew Kane
1 parent c6f6be8b

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,13 +88,14 @@ module Searchkick
88 filter: ["standard", "lowercase", "asciifolding", "stop", "searchkick_shingle", "snowball", "searchkick_synonym"] 88 filter: ["standard", "lowercase", "asciifolding", "stop", "searchkick_shingle", "snowball", "searchkick_synonym"]
89 # filter: ["standard", "lowercase", "asciifolding", "stop", "snowball"] 89 # filter: ["standard", "lowercase", "asciifolding", "stop", "snowball"]
90 }, 90 },
  91 + # lucky find http://web.archiveorange.com/archive/v/AAfXfQ17f57FcRINsof7
91 searchkick2: { 92 searchkick2: {
92 type: "custom", 93 type: "custom",
93 tokenizer: "standard", 94 tokenizer: "standard",
94 # synonym should come last, after stemming and shingle 95 # synonym should come last, after stemming and shingle
95 # shingle must come before snowball 96 # shingle must come before snowball
96 # filter: ["standard", "lowercase", "asciifolding", "stop", "searchkick_shingle", "snowball", "searchkick_synonym"] 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 filter: { 101 filter: {
@@ -102,6 +103,12 @@ module Searchkick @@ -102,6 +103,12 @@ module Searchkick
102 type: "shingle", 103 type: "shingle",
103 token_separator: "" 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 searchkick_synonym: { 112 searchkick_synonym: {
106 type: "synonym", 113 type: "synonym",
107 ignore_case: true, 114 ignore_case: true,