Skip to content

Not possible to specify mappings for an attachment's title #330

Closed
@joshclark

Description

@joshclark

When creating an attachment field, I'd like to be able to specify mapping settings for the attachment's title. I can do this for the file, author and date (see AttachmentMappingDescriptor) but I can't do this for the title or keywords. See http://www.elasticsearch.org/guide/reference/mapping/attachment-type/ for a description of these fields. It looks like we just need to add a TitleField and a KeywordsField method to AttachmentMappingDescriptor just like has been done for the AuthorField.

The mapping I'm trying to get looks something like this:

  "contents": {
    "type": "attachment",
    "fields": {
      "contents": {
        "type": "string",
        "store": "yes",
        "term_vector": "with_positions_offsets"
      },
      "author": {
        "type": "string",
        "store": "yes"
      },
      "title": {
        "type": "string",
        "store": "yes"
      },
      "date": {
        "type": "date",
        "store": "yes"
      }
    }

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