We mentioned that Elasticsearch is a search engine in the article “What is Elasticsearch“. Searching for a keyword in Elasticsearch is very fast. In this article we will talk about the search types in elasticsearch. You may want to read the following articles before reading this article.
We’re connecting to Kibana for keyword search and we click on Discover and Relative from Time Range as you see in the screenshot below. If the data you export to elasticsearch has a date column, you will see a screen as follows.
In the following screenshot, we indicate that we will search within the last 15 minutes.
If you click Quick from Time Range, the following options are available.
If you click Absolute from Time Range, you can select the time interval you want to search for from a calendar.
Then, type the keyword you want to search in the marked field in the following screenshot, and press enter. The found keywords will be listed in yellow as below.
Search for a keyword in all data
If you type the keyword you’re looking for in the search section, it searches for the relevant keyword in all data.
Search for a keyword in a specific column
If you type
column_name: keyword in the search section, it will search only the related keyword in the corresponding column.
Search With AND && OR Operators
You can use AND and OR operators as follows.
fileset.name:syslog AND fileset.module=system
fileset.name:syslog OR fileset.module=system
You must type the keyword you want to search between two asterisks.
You can also search in a specific column in the following way.