Open Yivan opened 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.
Thanks for you answer!
If it can help you:
i think for multisite, storing the module (just like you store the controller and action) is a good thing (as often subsite it they are very different than main site (which is "website" module) are handled as different Zend module). To get the module for a document:
$module = $document->getModule();
and storing the siteId should be easy from the document:
$siteId = \Pimcore\Tool\Frontend::getSiteForDocument($document)->getId();
Please see:
https://www.pimcore.org/docs/latest/MVC/Routing_and_URLs/Working_with_Sites.html
https://github.com/pimcore/pimcore/blob/master/pimcore/lib/Pimcore/Tool/Frontend.php#L96
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.
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.