Vil du lære at oprette et indeks over Elasticsearch? I denne tutorial vil vi vise dig, hvordan du opretter et nyt indeks på ElasticSearch-serveren på en computer, der kører Ubuntu Linux.

• Ubuntu 18
• Ubuntu 19
• ElasticSearch 7.6.2

I vores eksempel er ElastiSearch-serverens IP-adresse 192.168.100.7.

Vigtigt! Elasticsearch bruger ordet Indeks i stedet for ordet Tabel.

Tutorial ElasticSearch - Oprettelse af et indeks

Installer de nødvendige pakker.

Copy to Clipboard

Test din kommunikation med ElasticSearch-serveren.

Copy to Clipboard

Her er kommandoen output:

Copy to Clipboard

Opret et ElasticSearch-indeks med navnet KONTI.

Copy to Clipboard

Her er kommandoen output:

Copy to Clipboard

Tilføj følgende felter:

• Brugernavn - Tekst
• Navn - Tekst
• E-mail - Tekst
• Alder - Numerisk

Copy to Clipboard

Her er kommandoen output:

Copy to Clipboard

Kontroller tilknytningskonfigurationen.

Copy to Clipboard

Her er kommandoen output:

Copy to Clipboard

Tillykke! Du har oprettet et nyt indeks på ElasticSearch-serveren.

Selvstudium ElasticSearch - Føje oplysninger til et indeks

Føj en post til ElasticSearch Index.

Copy to Clipboard

Her er kommandoen output:

Copy to Clipboard

Føj endnu en post til ElasticSearch Index.

Copy to Clipboard

Vis alle poster i indekset.

Copy to Clipboard

Her er kommandoen output:

Copy to Clipboard

Vis alle poster i indekset, der indeholder ordet Bruno.

Copy to Clipboard

Her er kommandoen output:

Copy to Clipboard

Vis alle poster i indekset med en alder på under 40 år.

Copy to Clipboard

Her er kommandoen output:

Copy to Clipboard

Tillykke! Du kan føje poster til et ElasticSearch-indeks.