I am requiring "elasticsearch/elasticsearch": "^7.1.1" in my Laravel project composer.json file, and when I perform "composer install" it says "- Downloading elasticsearch/elasticsearch (v7.11.0)". However, the actual version that is installed seems to be 6.8.14, as output by the curl -XGET 'http://localhost:9200' command and as displayed in Kibana.
I have tried running "composer clearcache", deleting the vendor folder and composer.lock, rerunning "composer install", then restarting Elasticsearch, but the actual installed version does not seem to change.
Previously Elasticsearch was being installed as a dependency of "ruflin/elastica": "7.*", and it was still installing as version 6.8.14, even though ruflin/elastica": "7.* requires Elasticsearch ^7.1.1.
When we call the \Elastica\Index updateDocument() method in ruflin/elastica, it throws the error "Document mapping type name can't start with '_', found: [_update]" which I assume is being caused by the failure to upgrade the Elasticsearch version. What is the best way to fix this?