Skip to content

Define nested fields #17

Open
Open
@v-kolesnikov

Description

@v-kolesnikov

https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html

Here is a workaround

schema(:my_index) do
  attribute :authors,
    Types::Object.meta(
      type: 'nested',
      properties: {
        'person_name': { 'type': 'text' }
      }
    )
end

that should be rewritten as following:

schema(:my_index) do
  attribute :authors, Types::Nested do
    attribute :person_name, Types.Text
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions