codemix/YiiElasticSearch — pull request #19 by schmunk42 (2013-10-16 17:37:45+00:00)
Title: updated console command to use index prefix from application component

I hope the subject and the code are almost self-explaining.

I had to make the command use the prefix from the application component, because otherwise you won't be able to do this: `yiic elastic index --model=Foo` since you'd never get the `prefixIndex` your model is using.

This may be implemented cleaner, but this was the way with minimal changes.

Eg. the search action needs to pass unprefixed indices, but I've updated all commands to show the prefixed (and really used) index.

PS: Another nice option would be to show the component config (prefix, etc..) to really know with which database you'll be interacting with - I'll open a separate PR for this.