Skip to content

Conversation

JefStat
Copy link
Contributor

@JefStat JefStat commented Apr 12, 2017

Following nest call fails:
elasticClient.CreateIndex("testindex",
descriptor =>
descriptor.Mappings(mappings => mappings
.Map(md => md
.Properties(props => props
.Date(d => d.Name("Time").Format(DateFormat.epoch_millis))
...

{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "Failed to parse mapping [event]: Invalid format: [epoch_mills]: Illegal pattern component: p"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping [event]: Invalid format: [epoch_mills]: Illegal pattern component: p",
    "caused_by": {
      "type": "illegal_argument_exception",
      "reason": "Invalid format: [epoch_mills]: Illegal pattern component: p",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "Illegal pattern component: p"
      }
    }
  },
  "status": 400
}

JefStat and others added 2 commits April 12, 2017 16:37
Following nest call fails:
elasticClient.CreateIndex("testindex",
                        descriptor =>
                            descriptor.Mappings(mappings => mappings
                                .Map<EventMapping>(md => md
                                    .Properties(props => props
                                        .Date(d => d.Name("Time").Format(DateFormat.epoch_millis))
...

```
{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "Failed to parse mapping [event]: Invalid format: [epoch_mills]: Illegal pattern component: p"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping [event]: Invalid format: [epoch_mills]: Illegal pattern component: p",
    "caused_by": {
      "type": "illegal_argument_exception",
      "reason": "Invalid format: [epoch_mills]: Illegal pattern component: p",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "Illegal pattern component: p"
      }
    }
  },
  "status": 400
}
```
@Mpdreamz
Copy link
Member

Snap! I must have gone over that file a dozen time, i was so sure i'd make a typo somewhere. Thank you for spotting and fixing this @JefStat !

@Mpdreamz Mpdreamz merged commit ead6b41 into elastic:master Apr 13, 2017
@Mpdreamz
Copy link
Member

ported to 2.x and 5.x

@JefStat JefStat deleted the patch-1 branch April 13, 2017 18:16
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

Successfully merging this pull request may close these issues.

2 participants