Skip to content

No Nest support for DynamicTemplate.MatchPattern (match_pattern property) #3373

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

Closed
jacob-123 opened this issue Aug 19, 2018 · 1 comment
Closed

Comments

@jacob-123
Copy link

NEST/Elasticsearch.Net version:
5.6.2 (Not present @5.6.3 as well
Elasticsearch version:
5.6.4
Description of the problem including expected versus actual behavior:
JSON:
"my_dynamic_mapping_string": {
"match_pattern": "regex",
"path_match": "foo[0-9]",
"match_mapping_type": "string",
"fielddata": true,
"copy_to": "bar"
Expected Nest:
.DynamicTemplate("my_dynamic_mapping_string", dm => dm
.MatchMappingType("string")
.PathMatch("foo[0-9]")
.MatchPattern("regex")
.Mapping(m => ...)
);
Actual Nest gets an error :
Error 18 'Nest.DynamicTemplateDescriptor' does not contain a definition for 'MatchPattern' and no extension method 'MatchPattern' accepting a first argument of type 'Nest.DynamicTemplateDescriptor' could be found (are you missing a using directive or an assembly reference?)

Steps to reproduce:

  1. Use Nest 5.6.x
  2. Create a dynamic Mapping using the above Dynamic Template :
    client.Map(x => x.Index(indexName).Type(typeName)
    .DynamicTemplates(dt =>
    dt.DynamicTemplate("my_dynamic_mapping_string", dm =>
    dm.MatchMappingType("string")
    .PathMatch("foo[0-9]")
    .MatchPattern("regex")
    .Mapping(m => ...))

Provide ConnectionSettings (if relevant):
Not Relevant
Provide DebugInformation (if relevant):
Not Relevant

@russcam
Copy link
Contributor

russcam commented Aug 20, 2018

Thanks @jacob-123, I've opened #3374 to address

russcam added a commit that referenced this issue Aug 23, 2018
Mpdreamz pushed a commit that referenced this issue Sep 3, 2018
Mpdreamz pushed a commit that referenced this issue Sep 3, 2018
@Mpdreamz Mpdreamz mentioned this issue Sep 10, 2018
45 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants