massiveart / MassiveSearchBundle

MIT License
67 stars 24 forks source link

Indexation of App Bundle in Symfony 4 #137

Closed cedricvazille closed 4 years ago

cedricvazille commented 4 years ago

I use Sulu for a couple of weeks now and I tried to index an entity of my project in App\Entity (App\Entity\Commune). I put the Commune.xml in src/Resources/config/massive-search/Commune.xml But when I execute php bin/console massive:search:reindex, nothing happens.

It seems that the explored paths for metadatas are only from bundle : $container->getParameter('kernel.bundles')

And so when I dump the paths form getBundleMappingPaths (DependencyInjection/MassiveSearchExtension.php), I only get this :

array:3 [ "Sulu\Bundle\ContactBundle\Entity" => "/Users/me/Documents/WebProjets/myproject/vendor/sulu/sulu/src/Sulu/Bundle/ContactBundle/Resources/config/massive-search" "Sulu\Bundle\MediaBundle\Entity" => "/Users/me/Documents/WebProjets/myproject/vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Resources/config/massive-search" "Sulu\Bundle\CategoryBundle\Entity" => "/Users/me/Documents/WebProjets/myproject/vendor/sulu/sulu/src/Sulu/Bundle/CategoryBundle/Resources/config/massive-search" ]

Is there a way to add AppBundle or is it a limitation which obliges to use a bundle to index entities ? Thank you very much :)

alexander-schranz commented 4 years ago

@cedricvazille thank you for reporting this issue. Can you check if #138 does work for you?

alexander-schranz commented 4 years ago

fixed by #137