byng-systems / pimcore-elastic-search-plugin

MIT License
8 stars 9 forks source link

Improvement: adding module and language in the document index. #35

Open Yivan opened 8 years ago

Yivan commented 8 years ago

Hello,

First thanks for sharing this elastic search plugin. It works fine and fast : ) This issue is about an idea of improvement to be able to use it on multisite and multilangage website.

For multisite, maybe the module could be added to the body (https://github.com/byng-systems/pimcore-elastic-search-plugin/blob/master/lib/Byng/Pimcore/Elasticsearch/Processor/Page/PageProcessor.php#L73), as often subsite are on different module (but it is not always the case). Maybe the siteId could be stored too.

For multilangage, the page language could be stored too. For asset, langage is more handled on the properties level... it is more tiedous. I didn't check the code for asset properties, but they maybe already store the langage assigned to the property in the elastic index ? If not, it could add it so we can make query based on this.

Thanks a lot.

seeruk commented 8 years ago

Hi @Yivan, thanks for the suggestions. We're always trying to improve this plugin, and these sound like some good changes to make.

I've not actually ever used the multisite features of Pimcore before, but we can probably look into that. If the language for pages isn't stored already that can definitely be added!

As for assets, I think that all properties on an asset are put into the index.

Yivan commented 8 years ago

Thanks for you answer!

If it can help you:

Storing $module and $siteId in the elastic database should do the trick, and developper can use it to refine the search on a module/subsite level.