Skip to content
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

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

Closed
joshclark opened this issue Aug 7, 2013 · 1 comment
Closed

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

joshclark opened this issue Aug 7, 2013 · 1 comment

Comments

@joshclark
Copy link

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"
      }
    }
@Mpdreamz
Copy link
Member

Thanks added them and also Metadatafield(string name, func mapping) to specify any field. See the updated tests.

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