From cdb9b2f2d3736b3a42854ff3bf96f2ca440bf25c Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 14 Jul 2013 22:34:39 -0700 Subject: [PATCH] Fixed most issues --- lib/searchkick.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/searchkick.rb b/lib/searchkick.rb index cacfbec..5881775 100644 --- a/lib/searchkick.rb +++ b/lib/searchkick.rb @@ -88,13 +88,14 @@ module Searchkick filter: ["standard", "lowercase", "asciifolding", "stop", "searchkick_shingle", "snowball", "searchkick_synonym"] # filter: ["standard", "lowercase", "asciifolding", "stop", "snowball"] }, + # lucky find http://web.archiveorange.com/archive/v/AAfXfQ17f57FcRINsof7 searchkick2: { type: "custom", tokenizer: "standard", # synonym should come last, after stemming and shingle # shingle must come before snowball # filter: ["standard", "lowercase", "asciifolding", "stop", "searchkick_shingle", "snowball", "searchkick_synonym"] - filter: ["standard", "lowercase", "asciifolding", "stop", "snowball", "searchkick_synonym"] + filter: ["standard", "lowercase", "asciifolding", "stop", "searchkick_shingle2", "snowball", "searchkick_synonym"] } }, filter: { @@ -102,6 +103,12 @@ module Searchkick type: "shingle", token_separator: "" }, + searchkick_shingle2: { + type: "shingle", + token_separator: "", + output_unigrams: false, + output_unigrams_if_no_shingles: true + }, searchkick_synonym: { type: "synonym", ignore_case: true, -- libgit2 0.21.0