Question: To filter by date, I use the following queries:

```
'body'  => [
    'query' => [
        'bool' => [
             'filter' => [
                  'range' => [
                      'expire_at' => [
                          'gte' => now()
                      ]
                 ]
             ]
         ]
    ]
]

```

UPD: All records have another date field - last\_checked. The question is how to select records in which, for example, (expire\_at - 7 days) > last\_checked?

Answer: 
try this :

```
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py --force-reinstall

```
Use `pip3` instead of `pip` i.e. `pip3 --version`