-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nodeindex:build only based on default dimension #336
Comments
Uh that sounds bad. The problem was, that Dimensions were cycled twice, once in the controller and once in https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor/blob/master/Classes/Indexer/NodeIndexer.php#L308 |
Yes, i still haven't found out why and how it worked in the old version. The new approach seems to work only if you have 1:1 relations in dimensions and nodes, but doesn't take "loose dimensions" into account. I can provide you with a PR how we worked around this issue (which is very pragmatic, not sure if it's the right way to go) and might make the second loop redundant (you might lose some weird orphan nodes though). (i.e. dimensions taken into account on root level, not on node level) |
After thinking about. Really helpful would be to add a lightweight test scenario with some nodes, that resamples your setup. The test could just run the indexer and test the result. An example can be found here https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor/blob/master/Tests/Functional/Eel/ElasticSearchQueryTest.php#L407. That would make debugging and fixing it for good much easier. |
Sounds good. Is there a practical guide on running the tests? |
Kinda like this? |
Yeah! You can run the test locally by running
|
Ok, the test fails (as it should, but not because of the wrong method). Took out the var_dump, just wanted to check if the error is the same as i keep getting and it is, so my setup seems to be somewhat correct. |
This now is a (probably) working test scenario: I had to adjust it to the neos/demo package which is the basis of the functional tests and its dimension-presets. |
btw - it is not only |
I am also experiencing this behaviour. Our setup is:
By changing |
With the merged PR #350 (version 7.0.3) this issue is gone in my current project. |
We have a setup with a dimension "zz" that only shares the rootpage for language selection, but is defaultPreset.
In the latest version of the Adaptor (on Neos 5.2 & ES 7) nodeindex:build will index only the nodes that are found in the zz dimension and their respective dimension representatives. So we end up with only Home being indexed in all dimensions, but no further pages.
A change introduced that we found is in NodeIndexCommandController:
Instead of calling
$this->workspaceIndexer->index()
,$this->workspaceIndexer->indexWithDimensions()
is being called, which doesn't loop over dimensions initially.But in order for the nodes to be indexed independently in all dimensions, it still doesnt work properly, since the rootNode still is "dimensionless":
Flowpack.ElasticSearch.ContentRepositoryAdaptor/Classes/Indexer/WorkspaceIndexer.php
Line 89 in 0660ba2
The text was updated successfully, but these errors were encountered: