Hi
I want to query a field of type text using match, but I want to query the full text and also be case-insensitive
What I mean is
I have a search I want to search as if I am searching using the term but not sensitive to the case of letters
Have you tried the term query with case_insensitive parameter set against the keyword mapped field/sub-field?
Case insensitive is the default behaviour.
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
Have a look at the Elastic Stack and Solutions Help · Forums and Slack | Elastic page. It contains also lot of useful information on how to ask for help.
No, I haven't tried it.
Can you give me an example of this because there is no clear example in the documents
GET /_search
{
"query": {
"term": {
"user.id": {
"value": "kimchy",
"case_insensitive": true,
"boost": 1.0
}
}
}
}
This assumes the user.id
field is mapped as keyword
.
Let the example be like this
"full_text": "Quick Brown Foxes!"
Now I want to query assuming that the field already exists
GET my-index-000001/_search?pretty
{
"query": {
"match": {
"full_text": "Quick Brown Foxes!"
}
}
}
He will repeat without any problem
the problem lies If you delete one of the words it will return results too and I don't want
I want the data not to be returned unless it matches, regardless of whether it is small or large
Thank you
This has benefited me.