Struktura indeksu w Elasticsearchu wygląda analogicznie. Prześledźmy na przykładzie jak taki indeks powstaje. Załóżmy, że mamy trzy dokumenty, które wysyłamy do Elasticsearcha:
pierwszy dokument
{
"id": 1,
"sentence": "The Force will be with you. Always."
}
1
2
3
4
{
"id": 1,
"sentence": "The Force will be with you. Always."
}
drugi dokument
{
"id": 2,
"sentence": "Do. Or do not. There is no try."
}
1
2
3
4
{
"id": 2,
"sentence": "Do. Or do not. There is no try."
}
trzeci dokument
{
"id": 3,
"sentence": "I am one with the Force. The Force is with me."
}
1
2
3
4
{
"id": 3,
"sentence": "I am one with the Force. The Force is with me."
}
Struktura indeksu w Elasticsearchu wygląda analogicznie. Prześledźmy na przykładzie jak taki indeks powstaje. Załóżmy, że mamy trzy dokumenty, które wysyłamy do Elasticsearcha:
pierwszy dokument
{
"id": 1,
"sentence": "The Force will be with you. Always."
}
1
2
3
4
{
"id": 1,
"sentence": "The Force will be with you. Always."
}
drugi dokument
{
"id": 2,
"sentence": "Do. Or do not. There is no try."
}
1
2
3
4
{
"id": 2,
"sentence": "Do. Or do not. There is no try."
}
trzeci dokument
{
"id": 3,
"sentence": "I am one with the Force. The Force is with me."
}
1
2
3
4
{
"id": 3,
"sentence": "I am one with the Force. The Force is with me."
}
W jaki sposób to przesłać ?