Search is as follows:
{"query":{"query_string":{"query":"armschel"}}}
My index has been defined as follows:
[
'number_of_shards' => 4,
'number_of_replicas' => 1,
'analysis' => [
'analyzer' => [
'index_analyzer' => [
'type' => 'custom',
'tokenizer' => 'standard',
'filter' => ['lowercase', 'snowball', 'metaphone_phonetic']
],
'search_analyzer' => [
'type' => 'custom',
'tokenizer' => 'standard',
'filter' => ['lowercase', 'snowball', 'metaphone_phonetic']
],
'description_analyzer' => [
'type' => 'custom',
'tokenizer' => 'standard',
'filter' => ['metaphone_phonetic', 'snowball'],
],
'domain_name_analyzer' => [
'type' => 'custom',
'tokenizer' => 'domain_ngram_tokenizer',
'filter' => ['lowercase']
],
],
'filter' => [
'metaphone_phonetic' => [
'type' => 'phonetic',
'encoder' => 'metaphone',
'replace' => false,
],
],
'tokenizer' => [
'domain_ngram_tokenizer' => [
'type' => 'nGram',
'min_gram' => '4',
'max_gram' => '45'
],
],
],
],
My mapping is as follows:
{
"sites" : {
"index_analyzer" : "index_analyzer",
"search_analyzer" : "search_analyzer",
"properties" : {
"client_comments" : {
"type" : "string"
},
"client_id" : {
"type" : "integer",
"index" : "no"
},
"client_name" : {
"type" : "string",
"boost" : 3.0
},
"cluster_name" : {
"type" : "string",
"index" : "no"
},
"comments" : {
"type" : "string"
},
"domains" : {
"type" : "string",
"index_analyzer" : "domain_name_analyzer"
},
"external_ip" : {
"type" : "ip",
"index" : "analyzed"
},
"id" : {
"type" : "integer",
"index" : "no"
},
"primary_domain" : {
"type" : "string",
"index" : "no"
},
"test_site" : {
"type" : "boolean",
"index" : "no"
}
}
}
}