babenkoivan / elastic-migrations

Elasticsearch migrations for Laravel
MIT License
189 stars 32 forks source link

Routing info for index #28

Closed Christophvh closed 3 years ago

Christophvh commented 3 years ago

This is probably already possible, but I am a bit confused about how to implement it with this package.

I would like to specify the _routing parameter on a document when indexing. Should I do this in searchableArray()? or can I do this in the index file? And if so can you give an example? Afterwards I will add it to the readme.

https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-routing-field.html

babenkoivan commented 3 years ago

Hey @Christophvh, you can do it as described here https://github.com/babenkoivan/elastic-scout-driver-plus#custom-routing.

Closing the issue as it's created in the wrong repository.