How to index a document in Elasticsearch - Spring Data Elasticsearch - Part 2

preview_player
Показать описание
In this tutorial series we take a look at Elasticsearch and see how we can use it together with Spring Boot. To make things easier for use we use awesome Spring Data Elasticsearch. For all of those who are not familiar with it, Elasticsearch is a distributed, free and open search and analytics engine for all types of data, including textual, numerical, geospatial, structured, and unstructured. Elasticsearch is built on Apache Lucene and was first released in 2010 by Elasticsearch N.V. (now known as Elastic). Known for its simple REST APIs, distributed nature, speed, and scalability, Elasticsearch is the central component of the Elastic Stack, a set of free and open tools for data ingestion, enrichment, storage, analysis, and visualization. Commonly referred to as the ELK Stack (after Elasticsearch, Logstash, and Kibana), the Elastic Stack now includes a rich collection of lightweight shipping agents known as Beats for sending data to Elasticsearch.

In this video we take a look how we can create an index without using annotations and add some data to it. When creating an index we apply mappings and settings all with use of integrated rest client.
In addition we index some data to created index and demonstrate how to do it without use of ElasticsearchRepository class.

Java API:

Source code:

This videos commit:

Experience the search:

URLs accessed in the tutorial:

#java #springboot #elasticsearch
Рекомендации по теме
Комментарии
Автор

Hi, Thank you so much for an insightful tutorial. I find it really helpful. Just a REQUEST - can you create a tutorial on how to create multiple type under one index and how to manage it

hummingster
Автор

thank you so much for this wonderful explanation,
Can you please provide an example for nested indexes ?

yousseflotfi
Автор

why didn't you created a differnet elastic search repository for vehicle class?

shashankraj
Автор

Hi, Thank you for uploading the tutorial, really helpful.
I wanted to know how can I retrieve all documents in an index with a query like api/vehicle/all?? Would be great if you could attach a snippet of code to implement this!

gowrishankarg
Автор

I got thıs error when ı post the vehicle, Rejecting mapping update to [xxx] as the final mapping would have more than 1 type: [_doc, xxx], can you help me

furkansubay
Автор

what is the advantages using this elasticsearch?

jasonadventure
Автор

A lot seems to have changed in the elasticsearch API and that makes it almost impossible to follow this tutorial especially for a beginner.

gafarraji
Автор

Hi,
Thanks for the sharing, really helpful..
Is there any way to search from multiple indexes with the same id.
I mean if suppose we have three different indexes vehicle, car and bus with data like type and id in all three.
If I search data based on Id.
Thanks

smahuja
Автор

IS there any way to retrieve score and total hits from elastic search?

snehalpatkari
Автор

does anyone know how to disable warn logs? 11:10

cugoman
Автор

if(indexExists){ continue;} - it's redundant, I guess. Overall, your code is quite ugly

djamsterdam
join shbcf.ru