DEV Community

loizenai
loizenai

Posted on

1

Elasticsearch Analyzers – Basic Analyzers

https://grokonez.com/elasticsearch/elasticsearch-analyzers-basic-analyzers

Elasticsearch Analyzers – Basic Analyzers

In this tutorial, we're gonna look at some basic analysers that Elasticsearch supports.

1. Keyword Analyzer

keyword analyzer returns the entire input string as a single token.


POST _analyze
{
  "analyzer": "keyword",
  "text": "Java Sample Approach"
}

Terms:


[ Java Sample Approach ]

2. Whitespace Analyzer

whitespace analyzer breaks text into terms whenever it encounters a whitespace character.


POST _analyze
{
  "analyzer": "whitespace",
  "text": "The Java Sample Approach's tutorials."
}

Terms:


[ The, Java, Sample, Approach's, tutorials. ]

3. Simple Analyzer

simple analyzer breaks text into lower cased terms whenever it encounters a character which is not a letter.


POST _analyze
{
  "analyzer": "simple",
  "text": "The Java Sample Approach's tutorials."
}

Terms:


[ the, java, sample, approach, s, tutorials ]

4. Stop Analyzer

stop analyzer is just like simple analyzer, but supports removing stop words (english stop words by default).


POST _analyze
{
  "analyzer": "stop",
  "text": "The Java Sample Approach's tutorials over years."
}

Terms:

more at:

https://grokonez.com/elasticsearch/elasticsearch-analyzers-basic-analyzers

Elasticsearch Analyzers – Basic Analyzers

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay