I have this query:
{
index: "contact_search",
compound: {
must: [
{equals: {path: "account_id", value: {'$oid': "63e0f08557f2fc26e391ccef"} }}
],
should: [
{phrase: {
query: "+ (insert phone number)",
path: "phone",
}}
],
minimumShouldMatch: 1
}
}
with this index:
{
"analyzer": "lucene.simple",
"searchAnalyzer": "lucene.simple",
"mappings": {
"dynamic": true,
"fields": {
"account_id": {
"type": "objectId"
},
"additional_emails": {
"analyzer": "emailAddressAnalyzer",
"tokenization": "edgeGram",
"type": "autocomplete"
},
"additional_phones": {
"maxGrams": 10,
"minGrams": 3,
"tokenization": "nGram",
"type": "autocomplete"
},
"assignee_id": {
"type": "objectId"
},
"email": [
{
"type": "string"
},
{
"analyzer": "emailAddressAnalyzer",
"tokenization": "edgeGram",
"type": "autocomplete"
}
],
"first_name": {
"maxGrams": 10,
"minGrams": 3,
"type": "autocomplete"
},
"last_name": {
"maxGrams": 10,
"minGrams": 3,
"type": "autocomplete"
},
"phone": [
{
"type": "string"
},
{
"maxGrams": 12,
"minGrams": 3,
"type": "autocomplete"
}
],
"second_last_name": {
"maxGrams": 10,
"minGrams": 3,
"type": "autocomplete"
}
}
},
"analyzers": [
{
"name": "emailAddressAnalyzer",
"tokenizer": {
"type": "uaxUrlEmail"
}
}
]
}
And no matter which phone I put, that is always returning 0 results. If I use the same query for email is working perfectly.
Could anyone help me?