Hello!
I've run into same problem as described in this post:
http://elasticsearch-users.115913.n3.nabble.com/Search-with-white-space-td2574112.html
Query just doesn't return anything if there are more than one search
term — query "Centre" returns document, containing "Centre Est",
"Centre E" returns nothing.
Tried to use the "shingle" token filter and the "nGram" tokenizer
(separately) — no luck
here is the config:
index :
analysis :
analyzer :
myAnalyzer2 :
type : custom
tokenizer : standard
filter : [shingle]
mapping:
"street" : {
"type" : "multi_field",
"fields" : {
"street_untouched" : {
"include_in_all" : false,
"index" : "not_analyzed",
"type" : "string"
},
"street_shingles" : {
"include_in_all" : false,
"analyzer" : "myAnalyzer2",
"type" : "string"
},
"street" : {
"type" : "string"
}
}
},
And this is query:
{"size"=>20,
"query"=>
{"bool"=>
{"should"=>
[{"prefix"=>{"street"=>"some str"}},
{"prefix"=>{"street_shingles"=>"some str"}},
{"prefix"=>{"street_untouched"=>"some str"}}]}}}
I would appreciate any corrections, advices or debug tips (is there a
way to peek inside the index?).
Thank you!