Mise en œuvre de la pagination des résultats d'une requête de recherche

Cheat Sheet

PUT /shakespeare
{
 "mappings": {
   "properties": {
    "speaker": {"type": "keyword"},
    "play_name": {"type": "keyword"},
    "line_id": {"type": "integer"},
    "speech_number": {"type": "integer"}
   }
 }
}


curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json


GET _cat/nodes?v

GET _cat/indices?v

### Recherche un terms via un boolean
GET bank/_search
GET bank/_search?size=20
GET bank/_search?size=20&from=20
GET bank/_search?size=20&from=0

### Recherche un terms via un boolean
GET bank/_search
{
    "size": 20,
    "from": 0,
    "query": {
        ....
    }
}