Hello, @dadoonet. These are the results:
autocomplete:
{
"tokens" : [
{
"token" : "joh",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 0
},
{
"token" : "john",
"start_offset" : 0,
"end_offset" : 4,
"type" : "word",
"position" : 1
},
{
"token" : "wic",
"start_offset" : 5,
"end_offset" : 8,
"type" : "word",
"position" : 2
},
{
"token" : "wick",
"start_offset" : 5,
"end_offset" : 9,
"type" : "word",
"position" : 3
},
{
"token" : "joh",
"start_offset" : 10,
"end_offset" : 13,
"type" : "word",
"position" : 104
},
{
"token" : "john",
"start_offset" : 10,
"end_offset" : 14,
"type" : "word",
"position" : 105
},
{
"token" : "wic",
"start_offset" : 15,
"end_offset" : 18,
"type" : "word",
"position" : 106
},
{
"token" : "wick",
"start_offset" : 15,
"end_offset" : 19,
"type" : "word",
"position" : 107
}
]
}
autocomplete_search:
{
"tokens" : [
{
"token" : "john.wick",
"start_offset" : 0,
"end_offset" : 9,
"type" : "<ALPHANUM>",
"position" : 0
},
{
"token" : "john",
"start_offset" : 10,
"end_offset" : 14,
"type" : "<ALPHANUM>",
"position" : 101
},
{
"token" : "wick",
"start_offset" : 15,
"end_offset" : 19,
"type" : "<ALPHANUM>",
"position" : 102
}
]
}
More information:
using username instead of username.autocomplete it is possible to query with "john.wick", however the search "john wick" fails to return the result.
"match": {
"username": {
"query": "john.wick",
"operator": "and"
}
}