Skip to content
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

Made template filtering generic and extensible #7454

Merged

Conversation

javanna
Copy link
Member

@javanna javanna commented Aug 26, 2014

Added the ability to register index template filters that are being applied when a new index is created, in order to decide whether a matching index template should be applied or not. The default filter that checks whether the template pattern matches the index name always runs first, additional filters can also be registered so that templates can be filtered out based on custom logic.

Took the chance to add the handy source(Object... source) method to PutIndexTemplateRequest and corresponding builder.

Closes #7459

@javanna
Copy link
Member Author

javanna commented Aug 26, 2014

@imotov since you had a look at the original PR from @uboness, can you have a look at this one? ;)

@javanna javanna force-pushed the enhancement/index_templates_filtering branch from c309dc0 to b4081cd Compare August 26, 2014 12:18
@imotov
Copy link
Contributor

imotov commented Aug 26, 2014

LGTM

} else {
updatedSettingsBuilder.put(entry.getKey(), entry.getValue());
if (indexTemplateFilters.isEmpty()) {
this.indexTemplateFilter = new DefaultIndexTemplateFilter();
Copy link
Contributor

Choose a reason for hiding this comment

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

the default filter can be static instead of generated?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, good point!

@javanna javanna force-pushed the enhancement/index_templates_filtering branch from b4081cd to e031fb7 Compare August 27, 2014 10:29
…lugins

Added the ability to register template filters that are being applied when a new index is created. The default filter that checks whether the template pattern matches the index name always runs first, additional filters can also be registered so that templates can be filtered out based on custom logic.

Took the chance to add the handy source(Object... source) method to PutIndexTemplateRequest and corresponding builder

Closes elastic#7459
Closes elastic#7454
@javanna javanna force-pushed the enhancement/index_templates_filtering branch from e031fb7 to 92ae3c8 Compare August 27, 2014 10:37
@javanna javanna merged commit 92ae3c8 into elastic:master Aug 27, 2014
javanna added a commit that referenced this pull request Aug 27, 2014
…lugins

Added the ability to register template filters that are being applied when a new index is created. The default filter that checks whether the template pattern matches the index name always runs first, additional filters can also be registered so that templates can be filtered out based on custom logic.

Took the chance to add the handy source(Object... source) method to PutIndexTemplateRequest and corresponding builder

Closes #7459
Closes #7454
@javanna javanna removed the review label Aug 27, 2014
javanna added a commit that referenced this pull request Sep 8, 2014
…lugins

Added the ability to register template filters that are being applied when a new index is created. The default filter that checks whether the template pattern matches the index name always runs first, additional filters can also be registered so that templates can be filtered out based on custom logic.

Took the chance to add the handy source(Object... source) method to PutIndexTemplateRequest and corresponding builder

Closes #7459
Closes #7454
@clintongormley clintongormley changed the title Index templates: made template filtering generic and extensible Index templates: Made template filtering generic and extensible Sep 8, 2014
@clintongormley clintongormley changed the title Index templates: Made template filtering generic and extensible Made template filtering generic and extensible Jun 6, 2015
@clintongormley clintongormley added :Data Management/Indices APIs APIs to create and manage indices and templates and removed :Index Templates labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java API: Add mapping(Object... source) simplified setter to PutIndexTemplateRequest
4 participants