floriansemm / SolrBundle

Solr-Integration into Symfony and Doctrine2
http://floriansemm.github.io/SolrBundle
MIT License
123 stars 73 forks source link

Multiple core set unique index populate #143

Closed VicenKaZz closed 7 years ago

VicenKaZz commented 8 years ago

Hi, In my project I have two core for solr. When my webservice inject data, my two core are well indexed.

But for exemple if I need to populate himself with solr:index:populate. This command create only one index in first core.

Have you an idea how I can resolve this situation.

Best regards,

Vincent.

floriansemm commented 8 years ago

try this: https://github.com/floriansemm/SolrBundle#indexhandler-property

VicenKaZz commented 8 years ago

Not working for me, work when i insert from symfony data, index it's ok, but i have this problem only if i use console/shell for launch command solr:index:populate.

EDIT : Property from config or Class entity ?

If you leave the index or indexHandler property empty, then the default core will be used (first one in the endpoints list)

floriansemm commented 8 years ago

Your problem should be fixed in 9f8e5bf

If no @Solr\Document(index="..") or @Solr\Document(indexHandler="..") is set then the first core-config from your config.yml is used

VicenKaZz commented 8 years ago

Ok thanks a lot, i can't test now because stability requirement. But great job :)

VicenKaZz commented 7 years ago

I have change my stability requirement, it's work perfect, just one detail, the field id have the same prefix document name in the two core. But it's a detail , my two core is populate correctly. So I close this open issue because it's done in the first request.