Hi,
Does this below index settings & mapping correct?
{
"mappings":{
"record_type_1":{
"properties":{
"column_1":{
"fields":{
"metaphone":{ "type":"string", "analyzer":"data_metaphone" },
"partial":{ "search_analyzer":"full_data", "index_analyzer":"partial_data", "type":"string" },
"column_1":{ "type":"string", "analyzer":"full_data" }
}
"type" : "multi_field",
"path": "just_name",
}
}
}
},
"settings":{
"number_of_shards":3,
"analysis":
{
"filter":{
"data_ngrams":
{
"side":"front",
"max_gram":10,
"min_gram":1,
"type":"edgeNGram"
},
"data_metaphone":
{
"replace":false,
"encoder":"metaphone",
"type":"phonetic"
}
},
"analyzer":{
"full_data":
{
"filter":[
"standard",
"lowercase",
"asciifolding"
],
"type":"custom",
"tokenizer":"standard"
},
"data_metaphone":{
"filter":[
"data_metaphone"
],
"type":"custom",
"tokenizer":"standard"
},
"partial_data":{
"filter":[
"standard",
"lowercase",
"asciifolding",
"data_ngrams"
],
"type":"custom",
"tokenizer":"standard"
}
}
}
}
}
I have followed the below link
http://elasticsearch-users.115913.n3.nabble.com/help-needed-with-the-query-td3177477.html#a3178856
The below configuration am I missing anything or doing anything wrong?
{
"mappings":{
"record_type_1":{
"properties":{
"column_1":{
"fields":{
"metaphone":{ "type":"string", "analyzer":"data_metaphone" },
"partial":{ "search_analyzer":"full_data", "index_analyzer":"partial_data", "type":"string" },
"column_1":{ "type":"string", "analyzer":"full_data" }
}
"type" : "multi_field",
"path": "just_name",
},
"column_2":{
"type":"string",
"analyzer":"simple",
"similarity":"attr_similarity",
"null_value":"NA",
"include_in_all":true
}
}
}
},
"settings":{
"number_of_shards":3,
"analysis":
{
"filter":{
"data_ngrams":
{
"side":"front",
"max_gram":10,
"min_gram":1,
"type":"edgeNGram"
},
"data_metaphone":
{
"replace":false,
"encoder":"metaphone",
"type":"phonetic"
}
},
"analyzer":{
"full_data":
{
"filter":[
"standard",
"lowercase",
"asciifolding"
],
"type":"custom",
"tokenizer":"standard"
},
"data_metaphone":{
"filter":[
"data_metaphone"
],
"type":"custom",
"tokenizer":"standard"
},
"partial_data":{
"filter":[
"standard",
"lowercase",
"asciifolding",
"data_ngrams"
],
"type":"custom",
"tokenizer":"standard"
}
},
"similarity":{
"attr_similarity":{
"type":"BM25",
"k1":"2",
"b":"0.75",
"discount_overlaps":"true"
}
}
}
}
}
warkolm
(Mark Walkom)
September 2, 2015, 4:30am
3
Going by line counts, you need a comma on line 10, and remove the one at the end of line 12.
Once I have executed it and to view the mapping I have used http://localhost:9200/inventory_index_v4/_mapping/record_type_1 : The output of the mapping looks like
{
"index_v4": {
"mappings": {
"record_type_1": {
"properties": {
"column_1": {
"type": "string",
"analyzer": "full_data",
"path": "just_name",
"fields": {
"metaphone": {
"type": "string",
"analyzer": "data_metaphone"
},
"partial": {
"type": "string",
"index_analyzer": "partial_data",
"search_analyzer": "full_data"
}
}
},
"column_2": {
"type": "string",
"analyzer": "simple",
"null_value": "NA",
"include_in_all": true
}
}
}
}
}
}
I am not able to see "type" : "multi_field",
"path": "just_name" these configuration?