Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Indexes aren't created on import #61

Closed
alexc-hollywood opened this issue May 10, 2017 · 1 comment
Closed

Indexes aren't created on import #61

alexc-hollywood opened this issue May 10, 2017 · 1 comment

Comments

@alexc-hollywood
Copy link

alexc-hollywood commented May 10, 2017

OS X / Laravel 5.4
Elasticsearch 5.4 (running, homebrew)
"laravel/scout": "^3.0",
"tamayo/laravel-scout-elastic": "^3.0",
"elasticsearch/elasticsearch": "^5.2",
QUEUE=sync

Importing the model:

php artisan scout:import "Acme\Models\Service"
Imported [Acme\Models\Service] models up to ID: 100
Imported [Acme\Models\Service] models up to ID: 200
Imported [Acme\Models\Service] models up to ID: 300
Imported [Acme\Models\Service] models up to ID: 400
Imported [Acme\Models\Service] models up to ID: 500
Imported [Acme\Models\Service] models up to ID: 530
All [Acme\Models\Service] records have been imported.

Result from http://localhost:9200/_cat/indices?v

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size

Tested with all models after multiple ES restarts. Happens every time for every model.

Changing driver creates indexes successfully in MySQL or Solr.

@alexc-hollywood
Copy link
Author

Closing this for solution: it's not immediately obvious, but fixed this by manually creating the index first so it exists (doesn't seem to be idempotent). Once it's there (all lowercase), the docs are added.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant