SolrBundle icon indicating copy to clipboard operation
SolrBundle copied to clipboard

Nested Documents

Open Mortagus opened this issue 7 years ago • 12 comments

Hello everyone,

I'm working now on a proof of concept about Solr documents with nested data.

I'm wondering if there is a implementation of the "childDocuments" from Solr server.

Mortagus avatar Mar 21 '17 13:03 Mortagus

The solarium client supports nested documents but is not yet implemented in this bundle

floriansemm avatar Mar 21 '17 15:03 floriansemm

ok thanks for your help :-)

Mortagus avatar Mar 21 '17 15:03 Mortagus

Would it be possible to update the composer.json file ? The solarium library is at the 3.8 version and apparently it's needed to have the nested document feature (if I read correctly the documentation)

Mortagus avatar Mar 21 '17 15:03 Mortagus

sure! where is your pull-request? ;)

floriansemm avatar Mar 21 '17 15:03 floriansemm

Can you develop what you mean ?

I've never made any contribution into a github repo before.

How do I do that pull request ?

Mortagus avatar Mar 24 '17 13:03 Mortagus

After some reflexion, I think I know what it is. But I've never done that on github. Can you give me the procedure, just to be sure I'm not doing something wrong ;-)

Mortagus avatar Mar 24 '17 13:03 Mortagus

if you want a higher version of the solarium client just run: composer require solarium/solarium:^3.8

floriansemm avatar Mar 24 '17 13:03 floriansemm

This is what I wanted to do, but I discussed this with my coworker, and we decided it was a secondary requirement we didn't want in our composer file. That dependency is linked to your project, so it has to stay there.

It's just about compartmentalizing the dependencies.

Mortagus avatar Mar 24 '17 13:03 Mortagus

Well, my bundle requires version 3.6 and you need version 3.8, so we speak here about a project-specific dependency.

The next release contains a nested-document feature which requires the version 3.8. If you can wait then you do need to update your project-dependencies.

floriansemm avatar Mar 24 '17 15:03 floriansemm

Hello Florian,

thanks for your answer. I think you're right. This need is specific to our project so I'm going to update the dependency in our own composer file ;-).

Can I ask your opinion: do you think there will be side effects if we're using the 3.8 version ?

Mortagus avatar Mar 27 '17 08:03 Mortagus

version 3.8 does not contain critical changes and I have not notice strange behavior with my local setup. So everything should work well.

floriansemm avatar Mar 27 '17 08:03 floriansemm

Hello @floriansemm ,

I'm still on this feature ^^ (a lot of work has been done on other things though). Now I need to store a list of element as array. But, like you said in a previous comment: I would need to implement childDocuments.

Can you give me some advice to implement something that would respect good practice ? Do you think it would be interesting to extend you Field class ?

Mortagus avatar Jun 14 '17 11:06 Mortagus