Use of match phrase prefix query

Hi all,

i have a bool query, contains 3 different match query, the problem is when i search an address for example 'amk 549' or '549 amk' it will return me different results.

  • HORIZON GARDENS 549 ANG MO KIO AVENUE 2, SINGAPORE 567930
  • CHENG SAN PLACE 549 ANG MO KIO AVENUE 10, SINGAPORE 560549

i have synonym (amk is equals to ang mo kio)

when i search 549 amk, both results will show, but if i search amk 549, no results will return. how can i resolve this.

i guess the match_phrase_prefix will try to find text in order, when the order is not match, it wont return, but if i remove this phrase_prefix, i will lose this phrase_prefix function.

query:{
bool: {
should:[
{
match: {
searchText: {
query: q,
operator: 'and'
}
}
},
{
match: {
searchText: {
query: q,
fuzziness: 1,
prefix_length: 0
}
}
},
{
match: {
searchText: {
query: q,
max_expansions: 300,
type: 'phrase_prefix'
}
}
}
]
}
}