Hi
I have a query that looks like this:
{
"query": {
"bool": {
"must": [
{
"match_phrase": {
"fullAddress": "To-Bjerg 2"
}
}
]
}
},
"from": 0,
"size": 25
}
I want it to match both To-Bjerg 2 and To-Bjerg 22, but I seem to be unable to do that.
What am I doing wrong ?
My index mapping looks like this:
{
"addresses": {
"mappings": {
"properties": {
"addressId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"city": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"country": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"door": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"etrs89CoordinatEast": {
"type": "double"
},
"etrs89CoordinatNorth": {
"type": "double"
},
"floor": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"fullAddress": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"houseNumber": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"postalCode": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"postalCodeAndCity": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"status": {
"type": "integer"
},
"street": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"streetAddress": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"streetAndPostal": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"updated": {
"type": "date"
}
}
}
}
}
What am I doing wrong ?