Hi all,
It seems that there is something about wildcard queries that it is not clear to me
As far as I understand, Wildcard queries are term queries so. the search term is not analysed itself and it is "compared" against the terms in the inverted index.
So suppose that I define an index using the default mappings and I put this document
POST my_test/_doc/1
{
"test_test": "I dream of butterflies instead"
}
and run a wildcard query (I'm just testing the behavior, I know that it is not a good practice to put a * at the front of the search term)
GET my_test/_search
{
"query": {
"wildcard": {
"test_test": {
"value":"*butterflies*"
}
}
}
}
I get one hit and it is the expected behaviour.
But if I execute the following
GET my_test/_search
{
"query": {
"wildcard": {
"test_test": {
"value":"*Butterflies*"
}
}
}
}
I also get a hit, which I did not expect to have (as far as the search term is not analysed)
What am I understanding wrong?
Thank you very much
Regards
Anny