I have made kind of an RSS aggregator that stores news RSSs in elasticsearch and i would like to perform case sensitive searches. From what I have read (I am new to ES) I've seen that by default ES is case insensitive. Can anyone help me with this? "title": "guid": "link": "content": I want to perform the case sensitive search in the content part of the entry
What you have been read is correct! Elasticsearch text
field type using standard analyzer which have lowercase token filter by default. To use this, just index your data and search with match query. Here is an example for you:
POST rss_aggregator/_doc
{
"title": "Breaking News",
"guid": "12345",
"link": "https://example.com/news/breaking-news",
"content": "Important Update on Economic Policies"
}
POST rss_aggregator/_doc
{
"title": "Tech Innovations",
"guid": "67890",
"link": "https://example.com/news/tech-innovations",
"content": "The latest iPhone is Amazing!"
}
POST rss_aggregator/_search
{
"query": {
"match": {
"content": {
"query": "amazing!"
}
}
}
}