Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codevate/restaurant-search-example
A companion project for our blog post on Elasticsearch's completion suggester.
https://github.com/codevate/restaurant-search-example
doctrine-orm elasticsearch elasticsearch-php elasticsearch-queries elasticsearch5 php restaurant-search symfony-application symfony2
Last synced: 3 months ago
JSON representation
A companion project for our blog post on Elasticsearch's completion suggester.
- Host: GitHub
- URL: https://github.com/codevate/restaurant-search-example
- Owner: Codevate
- Created: 2016-10-18T19:57:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-11T14:20:22.000Z (about 7 years ago)
- Last Synced: 2024-10-13T06:04:22.724Z (3 months ago)
- Topics: doctrine-orm, elasticsearch, elasticsearch-php, elasticsearch-queries, elasticsearch5, php, restaurant-search, symfony-application, symfony2
- Language: PHP
- Homepage: https://www.codevate.com/blog/14-implementing-search-as-you-type-autocomplete-with-elasticsearch-and-symfony
- Size: 56.6 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Restaurant Search
A companion project for our blog post on Elasticsearch's completion suggester.
## Getting started
Install dependencies:
```
composer install
bower install
```Create the database, setup the schema, and load the fixtures:
```
php app/console doctrine:database:create
php app/console doctrine:schema:update --force
php app/console doctrine:fixtures:load
```## Docker
Build and run the containers:
```
docker-compose build
docker-compose up -d
```Add `restaurant-search.dev` to your hosts file:
```bash
# Unix only: use this command to get the right IP, OSX binds to localhost
docker network inspect restaurantsearch_default | grep Gateway
sudo sh -c 'echo "127.0.0.1 restaurant-search.dev\n" >> /etc/hosts'
```Update `parameters.yml` to use the networked containers:
```yaml
parameters:
database_host: db
# ...
elasticsearch_host: elk
```Install dependencies, create the database schema, and populate Elasticsearch:
```
docker-compose exec node bower install
docker-compose exec php bash
composer install
sf doctrine:schema:update --force
sf doctrine:fixtures:load
```### Usage
- to visit the Symfony app.
- to visit Kibana (the "Dev Tools" side-menu option has replaced Elastic Sense).
- Logs for Symfony and Nginx are in `docker/logs`.
- `docker-compose down` when you're finished.## About Codevate
Codevate is a specialist [UK mobile app development company](https://www.codevate.com/) that builds cloud-connected software. This repository was created for a blog post about a [custom web application development](https://www.codevate.com/services/web-development) project and was written by Chris Lush.