Skip to content

Document mapping type name can't start with '_' #52

@jhonathas

Description

@jhonathas

When using put_document I received the following error:

** (MatchError) no match of right hand side value: {:error, %Elasticsearch.Exception{col: nil, line: nil, message: "Document mapping type name can't start with '_', found: [_doc]", query: nil, raw: %{"error" => %{"reason" => "Document mapping type name can't start with '_', found: [_doc]", "root_cause" => [%{"reason" => "Document mapping type name can't start with '_', found: [_doc]", "type" => "invalid_type_name_exception"}], "type" => "invalid_type_name_exception"}, "status" => 400}, status: 400, type: "invalid_type_name_exception"}}

My Elasticsearch version is 6.5.2.

I checked that by default document_url is using "_doc" and it seems that it will no longer be possible to start with "_" the type. Is there a way to solve without changing the code?

https://github.com/infinitered/elasticsearch-elixir/blob/5c7c2dd186217cb7d3c6252275e4ae47b193fe4b/lib/elasticsearch.ex#L127

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions