You will need to install docker and update the vm_map_max_count before Elastic will run properly.
- git clone [email protected]:hackzilla/elastic-contact-demo.git
- composer install --no-interaction --working-dir=./code;
- docker-compose up -d
- ./connect.sh
Once you run ./connect.sh
you will be able to run these examples.
E.g. php create-index.php
- create-index.php [Create Index]
- create-mapping.php [Create Type and Mapping]
- put-document.php [Generate Document]
- put-documents.php [Generate Documents]
- update-documents.php [Update Document, requires id being set manually]
- delete-index.php [Delete Index]
- delete-document.php [Delete Document]
Visit http://127.0.0.1:8888/
to run these examples.
- search.php [List Documents]
- fetch.php [View Document]
This is are examples on how to use Elastic Search, and not how to write secure PHP.
For a better example, see elastic dashboard demo.