Skip to content

Commit

Permalink
update setup code
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancday committed Jul 20, 2020
1 parent 7874401 commit a4d6773
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ After you clone this repo, change into the newly created directory.

Two options exist to run Solr.

### Docker option
### Docker option (recomended)

If you have [Docker](https://www.docker.com/products/docker-desktop) installed and running.

```
./docker.sh
```

which is:
or

```
docker pull solr:8.4.1
docker run -p 8983:8983 -v $(PWD)/solr_home:/opt/mysolrhome -e SOLR_HOME=/opt/mysolrhome -e INIT_SOLR_HOME=yes solr:8.4.1
docker run -p 8983:8983 -v $(pwd)/solr_home:/opt/mysolrhome -e SOLR_HOME=/opt/mysolrhome -e INIT_SOLR_HOME=yes solr:8.4.1
```

### Local option
Expand All @@ -59,25 +59,29 @@ curl -o tmdb.json https://o19s-public-datasets.s3.amazonaws.com/tmdb.json

2. Install the [pysolr](https://github.com/django-haystack/pysolr) library

Optional: set up a virtual environment.
Recomended: set up a virtual environment.

```
python3 -m venv venv
```

then

```
python -m venv venv
source venv/bin/activate
```

Required:
Required: install dependencies

```
pip install pysolr
# or
pip install -r requirements.txt
pip3 install -r requirements.txt
```


3. Index movies

```
python indexTmdb.py
python3 indexTmdb.py
```

# Confirm Solr has TMDB movies
Expand All @@ -94,7 +98,7 @@ If you want to use Postman during the TLRE class:

1. Download [Postman](https://www.postman.com/downloads/) for your OS
2. Open Postman and Import (top-menu >> File) `solr-TLRE-postman_collection.json`
3. Define a global variable (grey eye icon in the upper-right) `solr_host` to point to your running Solr instance (default is `localhost:8983`)
3. Define a global variable (grey eye icon in the upper-right) `solr-host` to point to your running Elasticsearch instance (default is `localhost:8983`)
4. Tinker with the base URL, Params or JSON Body (optional)
5. Press 'Send' (blue rectangle button right of URL bar)

0 comments on commit a4d6773

Please sign in to comment.