Skip to content

FEATURE: Skip specific node type or namespace from indexing#234

Merged
daniellienert merged 8 commits intoFlowpack:masterfrom
dfeyer:feature-disable-indexin-per-nodetype-or-namespace
Dec 7, 2019
Merged

FEATURE: Skip specific node type or namespace from indexing#234
daniellienert merged 8 commits intoFlowpack:masterfrom
dfeyer:feature-disable-indexin-per-nodetype-or-namespace

Conversation

@dfeyer
Copy link
Copy Markdown
Contributor

@dfeyer dfeyer commented Sep 6, 2017

No description provided.

@dfeyer dfeyer force-pushed the feature-disable-indexin-per-nodetype-or-namespace branch from ede2d3d to 5c36e96 Compare September 6, 2017 19:22
@dfeyer dfeyer requested a review from kdambekalns September 6, 2017 20:10
kdambekalns
kdambekalns previously approved these changes Sep 7, 2017
Copy link
Copy Markdown
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nice one!

@daniellienert daniellienert self-requested a review September 7, 2017 21:49
@daniellienert
Copy link
Copy Markdown
Contributor

Hey @dfeyer,
nice feature, but I am not convinced of how it is configured.
NodeType specific configuration for the indexing is done in the nodeType configuration, I think the "excludeFromConfiguration" flag should be in the nodeType configuration too and not in a separate configuration. If we have it in nodeTypes, we get the superType resolving for free.

Is there a reason why you configure this separately?

Copy link
Copy Markdown
Contributor

@daniellienert daniellienert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why the exclude setting is not part of the NodeType configuration. See my other comment for details.

@kdambekalns
Copy link
Copy Markdown
Member

Indeed… good point! Also, if in the settings, it should probably be below Neos.ContentRepository.Search, since that functionality is not only related to Elasticsearch, but could/should be supported elsewhere as well.

@dfeyer
Copy link
Copy Markdown
Contributor Author

dfeyer commented Sep 15, 2017

Make sense to move it the the NodeType configuration, I can do that next week.

@dfeyer
Copy link
Copy Markdown
Contributor Author

dfeyer commented Oct 6, 2017

@daniellienert But Full namespace notation (Neos.Neos:*) will not be supported and its quiet nice to have, so I think decoupling this configuration from the NodeType make sense, @kdambekalns what do you think ?

Fine to move to Neos.ContentRepository.Search, but keep this configuration in the Settings

@dfeyer
Copy link
Copy Markdown
Contributor Author

dfeyer commented Oct 19, 2017

So now the Settings are moved to ElasticSearch.ContentRepositoryAdaptor.Search.defaultConfigurationPerNodeType

So I think this can be merged, I will push a PR to the ElasticSearch.ContentRepositoryAdaptor.Search tomorrow to add default configuration and update the README there and maybe ping @kitsunet to adapt the Sqlite Adapter too.

@daniellienert
Copy link
Copy Markdown
Contributor

@dfeyer: Sorry, for me it still feels wrong to have this type of configuration somewhere else as in the nodetype configuration and to use a “.*” notation instead of the NodeType inheritence. It is not consistent with the other configuration options we have.

Maybe we find a solution for the use case to exclude a complete Package.

But I don't want to block it just for my feeling. Would be great to get some more opinions on that. Maybe from @kitsunet or @skurfuerst. If really think its a good idea, it's fine to dismiss my review.

@dfeyer
Copy link
Copy Markdown
Contributor Author

dfeyer commented Oct 19, 2017

Maybe we find a solution for the use case to exclude a complete Package.

Basically a node type namespace is not a package name, so no way to have something to exclude a package, here I want to exclude a NodeType namespace ;) same name than a package key, but different concept.

to use a “.*” notation instead of the NodeType inheritence

And nothing to do with Node type inheritance all the node types of a given namespace doest not inherit from a single parent node they are just part of the same namepace, check the Neos.NodeTypes package, you can not use inheritance for this case. So if someone add a new node type you need to exclude it explicitly (certainly after something break, if you are not aware of the addition)

Overview of the configuration is also more easy with this solution, you have a single place to check.

And as said earlier, I'm fine to have a configuration per node type, but basically the priority check must be (if this PR is accepted) Settings then NodeType options.

The configuration can be extended to include child nodes in a future iteration:

Neos:
  ContentRepository:
    Search:
      defaultConfigurationPerNodeType:
        'Neos.Neos:Shortcut':
          indexed: false
          includeChildNodes: true

@daniellienert daniellienert dismissed their stale review October 23, 2017 09:16

All arguments exchanged

@dfeyer
Copy link
Copy Markdown
Contributor Author

dfeyer commented Nov 12, 2017

During the sprint I will update the PR to cleanup the settings and prepare a PR for the Search package, to make this feature visible. And ping @kitsunet if he's ok to implement it in the SqlLite adaptor.

@kdambekalns kdambekalns dismissed their stale review February 6, 2018 17:28

That review was a bit old, wasn't it?

…mespace

# Conflicts:
#	Classes/Mapping/NodeTypeMappingBuilder.php
Copy link
Copy Markdown
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works in practice with unchanged settings.

@daniellienert daniellienert merged commit d3ee983 into Flowpack:master Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants